--- Larry Wall <[EMAIL PROTECTED]> wrote: > If {...} supplies list context by default, most > intepolations are either the same length or shorter: > > $($foo) {$foo} > @(@foo) [EMAIL PROTECTED] > $(@foo) [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED] >
Tres PHP, sir. > Plus, as I mentioned, it cleans up the "$file.ext" mess, the > "[EMAIL PROTECTED]" mess, and the "%08x" mess. That's three FAQs that > don't have to exist. Ironically, I was grousing a couple of weeks back on the Sitepoint PHP forum that the $foo vs. {$foo} interpolator wasn't smart enough -- it had a limited submode for interpolated symbols instead of going into 'get me a var-exp'. The flip side of that is that it's based on supporting two ways of interpolating: "plain $old text" and "special {$interpolated} text". I wonder if you're talking about having just one {$interpolation} mode, or if simple interpolations stay undelimited? > : The prospect of backslashing every opening brace in every > : interpolated string is not one I relish. > > I'm just looking for what will be least confusing to the most > people here. We can certainly have other possible behaviors, but > something simple needs to be the default, and $() doesn't feel right > to me anymore. Suppose there was a "" default that was "you must quote curlies", and alternates like: q{ You must still quote curlies, else they interpolate. } q( You must quote parens, else they interpolate. ) q[ You must quote brackets, else they interpolate. ] (And, while I'm at it, how about the cool: qv( sym ) which expands to the @(file, line) || $line on which SYM was declared/first encountered. :-) =Austin