RFE: Allow newline when returning an anonymous object

cowwoc cowwoc at bbs.darktech.org
Wed May 28 11:48:18 PDT 2014


On 28/05/2014 2:42 PM, Brendan Eich wrote:
> Oliver Hunt wrote:
>> What you're asking for is grammatically ambiguous in a way that would 
>> potentially break existing content, and (generally) leads to really 
>> interesting parsing behaviour.
>
> As Doug Crockford has argued, this is why K&R style is better in JS: 
> always put the { at the end of the line whose first token starts the 
> statement.
>
>   if (C) {
>     . . .
>   }
>
> and not
>
>   if (C)
>   {
>     . . .
>   }
>
> /be

That's an unfortunate side-effect. I think that developers should be 
able to pick their own code styles. After all, most of these choices are 
subjective. Anyway, thanks for the head's up.

Gili
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140528/659b0bfe/attachment.html>


More information about the es-discuss mailing list