Proposal: Modify automatic semicolon insertion in strict mode
David-Sarah Hopwood
david.hopwood at industrial-designers.co.uk
Sun Dec 7 21:53:34 PST 2008
Yuh-Ruey Chen wrote:
> Eric Suen wrote:
>> Your proposal make nosense to me, first, I not sure what is your
>> strict mode means, because in strict mode there is no automatic
>> semicolon insertion.
No, semicolon insertion occurs also in strict mode. Perhaps it shouldn't.
>> in must examples you give there is no automatic semicolon insertion,
>> your proposal make thing even worse, these are just different coding
>> style, for examples, for long expression, it could be: [...]
>> if this will cause syntax error, I think no one will use JavaScript...
>
> Yes, it will make currently valid coding styles invalid, but that's for
> the sake of a clean grammar. I modeled my rules off what Ruby allows,
> and I haven't really heard Ruby authors complaining about those rules.
> If what you said was true, then Ruby would not be growing in popularity,
> even if it has a different language genealogy.
That's not a valid argument: Ruby had these rules from the start.
--
David-Sarah Hopwood
More information about the Es-discuss
mailing list