That hash symbol

Brendan Eich brendan at mozilla.com
Sat Mar 26 21:40:32 PDT 2011


On Mar 26, 2011, at 9:06 PM, Jeff Walden wrote:

> On 03/26/2011 07:44 PM, Brendan Eich wrote:
>>> Non leading-char solutions have the disadvantage of using some other kind of bracketing -- e.g. `a,b { return a + b; }`
>> 
>> This is ambiguous too. A comma expression followed by a block (if in an outer function, the return is legal).
> 
> I might be misreading, but I think Wes meant to have ` as a bracket-y character, such that on seeing it you switch to argument-parsing mode until you hit '{', or something like that, then end the entire thing with another ` ("bracket-y character").  There's no ambiguity there that I can see, although it has other issues, and wasn't seriously proposed anyway (as I read Wes).

Oh, I took the `` as meta, not concrete. If concrete, they are already used for quasis:

http://wiki.ecmascript.org/doku.php?id=strawman:quasis-smorgasboard

Any quote character delimiting suggest strings, not functions. JS doesn't have to look like other languages in every corner of its syntax, but it does look like some big ones in most respects already, and it's hard to argue for looking like nothing ever seen before, here!

/be

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110326/0feb5ee8/attachment.html>


More information about the es-discuss mailing list