As I understand it, escaping the $ char is context sensitive.  i.e.
\$foo will render as $foo if $foo is defined but as \$foo if foo is
undefined.  To me this seems very unfortunate.  Suppose I want to create
a template fragment for use in many different templates which needs to
render a literal $foo.  This is impossible since I can never be sure
whether or not foo will be defined and so I won't know whether to put
\$foo or $foo in the fragment.

Now this is not a huge problem, but it seems like an unnecessary one. 
Why were escapes designed to work this way?

Reply via email to