I have noticed a tendency in Unix shells and other languages like LaTeX, HTML to eliminate symmetric enclosing syntax.
By symmetric enclosing syntax, I mean that the opening and closing signs are the same, for example, shell single quote ', double quote " and backtick `, LaTeX $.
We are advised to replace symmetric enclosing syntax by asymmetric enclosing syntax, for example, write in shell $(ls) not `ls`, in LaTeX \(2+2\) not $2+2$.
Reasons for this change are the ease of interpretation for a human reader or a computer program (parser) and the problem of nesting.
The workaround for nesting quotes is usually to use double quotes at one level and single quotes at the other, but this does not work with three levels, for example echo "'"a"'"
, and also single and double quote differ with respect to parameter substitution so you can't use parameter substitution at both levels.
Is there a way to replace Unix shell single and double quotes by asymmetric constructs allowing nesting?
I have found $'' as an asymmetric alternative to single quotes but what for double quotes?
($"" does not work for this in zsh.)