Optional Curly Braces in JavaScript

Ed Saleh medozs at outlook.com
Sun Nov 3 23:59:59 UTC 2019


I don't like them too but sometimes, their use is more appropriate. Like readability and being less verbose.
________________________________
From: J Decker <d3ck0r at gmail.com>
Sent: Sunday, November 3, 2019 6:50:26 PM
To: Ed Saleh <medozs at outlook.com>
Cc: es-discuss at mozilla.org <es-discuss at mozilla.org>
Subject: Re: Optional Curly Braces in JavaScript



On Sun, Nov 3, 2019 at 1:11 PM Ed Saleh <medozs at outlook.com<mailto:medozs at outlook.com>> wrote:
Yes, I know JavaScript is influenced by the C syntax family, which is my favorite style. However, what I pushed for here is kind of merging of 2 programming languages families. We here are talking good attributes from Python and adding it to JavaScript.
Significant whitespace was the worst idea Python implemented.  Forced formatting is HORRIBLE.
And a lack of braces also makes re-nesting code and evolution more difficult.
Neither of these are good things for or from Python.
________________________________
From: Ed Saleh <medozs at outlook.com<mailto:medozs at outlook.com>>
Sent: Sunday, November 3, 2019 4:08:37 PM
To: Bergi <a.d.bergi at web.de<mailto:a.d.bergi at web.de>>; es-discuss at mozilla.org<mailto:es-discuss at mozilla.org> <es-discuss at mozilla.org<mailto:es-discuss at mozilla.org>>
Subject: Re: Optional Curly Braces in JavaScript

Ok, no problem. I know the committee doesn't add features easily, but starting a discussion is a good first step.
________________________________
From: es-discuss <es-discuss-bounces at mozilla.org<mailto:es-discuss-bounces at mozilla.org>> on behalf of Bergi <a.d.bergi at web.de<mailto:a.d.bergi at web.de>>
Sent: Sunday, November 3, 2019 4:05:36 PM
To: es-discuss at mozilla.org<mailto:es-discuss at mozilla.org> <es-discuss at mozilla.org<mailto:es-discuss at mozilla.org>>
Subject: Re: Optional Curly Braces in JavaScript

Hi!

> If it's possible in JavaScript to have `:`, and enable significant spacing, that would be great.
>
> Why you don't *want* to?

Your argument for significant whitespace seems to be that the simplicity
of Python is great. However, adding an alternative block syntax to
JavaScript would fail to achieve this goal, in contrast, it would only
make the language more complex.

So no, my educated guess is that it's not possible for you to persuade
the wider community and especially the technical committee to accept
your proposal. They are very reluctant to add features that don't show a
clear benefit.

Since you asked for my personal feedback: JS syntax was influenced by C
and Java, and it will consistently keep its curly braces. A different
block style would only be a viable choice for a new language or dialect,
which should not allow curly braces at all, and would not provide
backwards compatibility.

kind regards,
 Bergi
_______________________________________________
es-discuss mailing list
es-discuss at mozilla.org<mailto:es-discuss at mozilla.org>
https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________
es-discuss mailing list
es-discuss at mozilla.org<mailto:es-discuss at mozilla.org>
https://mail.mozilla.org/listinfo/es-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20191103/99747c0d/attachment-0001.html>


More information about the es-discuss mailing list