I declare this whole no-space-suffix idea a "bad path" and renounce it.
Again, CoffeeScript is its own (informally specified) language (Jeremy is
awesome). However: we should learn from it but not blindly copy from it.
/be
On Apr 13, 2011, at 8:42 PM, Bob Nystrom wrote:
> OTOH, if ? as an identifier suffix, no space allowed, were added to Harmony,
> then we would have a migration tax in the form of an early error, which
> *might* be ok:
>
> I'd find that a bit astonishing since other punctuators (like prefix "-" and
> "+" and postfix ":") don't work that way. If "?" did become a
> no-space-allowed identifier suffix, it might be nice to do the same thing for
> ":" property names in object literals since that would let you use reserved
> words as property names (or labels, I suppose) without complicating the
> parser:
>
> { if: 123 } // ok since "if:" becomes a single PropertyName("if") token and
> not IfToken followed by ColonToken.
>
> - bob
>
>
> // old code, note lack of space between a and ?
> x = a? b : c;
>
> Harmony treating ? as an identifier suffix as an existential test would then
> find the run-on fragment "b : c;" a syntax error.
>
> This still seems a bit shaky. Is it important compared to ?. and part of the
> "same package deal"?
>
> /be
>
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss