Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Ed Saleh
I don't like them too but sometimes, their use is more appropriate. Like readability and being less verbose. From: J Decker Sent: Sunday, November 3, 2019 6:50:26 PM To: Ed Saleh Cc: es-discuss@mozilla.org Subject: Re: Optional Curly Braces in JavaScript

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread J Decker
> *From:* Ed Saleh > *Sent:* Sunday, November 3, 2019 4:08:37 PM > *To:* Bergi ; es-discuss@mozilla.org < > es-discuss@mozilla.org> > *Subject:* Re: Optional Curly Braces in JavaScript > > Ok, no problem. I know the committee doesn't add features easily, but

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Sanford Whiteman
> C# had these feature but still the scientific community went for > Python and not C#. C# is a explicitly compiled language. And a Windows language. (Mono is irrelevant, it would be a huge dependency.) Next? ___ es-discuss mailing list

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Ed Saleh
of Sanford Whiteman Sent: Sunday, November 3, 2019 4:23:32 PM To: es-discuss@mozilla.org Subject: Re: Optional Curly Braces in JavaScript > People are more inclined to go for readable and less verbose > languages You keep saying that's *the reason* scientific and data-scientific community prefers

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Sanford Whiteman
> People are more inclined to go for readable and less verbose > languages You keep saying that's *the reason* scientific and data-scientific community prefers Python but haven't provided evidence, continuing to sidestep: ● Python's intrinsic support for large numbers ● Python's strong

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Pier Bover
The TC39 efforts are already quite diluted to add major changes to the language which, no offense, don't really add anything of value. OP if you really want a whitespaced language for the browser check Imba: https://www.imba.io/ It's not only a programming language but also a React replacement.

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Ed Saleh
, November 3, 2019 4:11:10 PM To: Bergi ; es-discuss@mozilla.org Subject: Re: Optional Curly Braces in JavaScript 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

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Ed Saleh
Saleh Sent: Sunday, November 3, 2019 4:08:37 PM To: Bergi ; es-discuss@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

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread kdex
@Bergi: Thanks. This is true only as long as the semantics of significant- whitespace blocks are supposed to stay exactly the same as the semantics of braced blocks. If this proposal is purely syntactical, you are right, but then, I would fail to see the point of this endeavor. @Ed: Maybe

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Ed Saleh
Ok, no problem. I know the committee doesn't add features easily, but starting a discussion is a good first step. From: es-discuss on behalf of Bergi Sent: Sunday, November 3, 2019 4:05:36 PM To: es-discuss@mozilla.org Subject: Re: Optional Curly Braces

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Bergi
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

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Ed Saleh
()}`. The brace less idea is building on the former. Thank you, From: es-discuss on behalf of kdex Sent: Sunday, November 3, 2019 3:39:48 PM To: es-discuss@mozilla.org Subject: Re: Optional Curly Braces in JavaScript Note that significant whitespace greatly

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Bergi
Hi! > Note that significant whitespace greatly minimizes the yields of minification Why would it? Nothing would prevent a minifier from changing significant whitespace into braced blocks - just like today, they omit semicolons where possible and remove braces around single-statement blocks.

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread kdex
Ed Saleh > Sent: Sunday, November 3, 2019 3:34:09 PM > To: Bergi ; es-discuss@mozilla.org > Subject: Re: Optional Curly Braces in JavaScript > > Why you don't *want* to? I didn't force you to like my proposal. I am just > posting my ideas for feedback, not see who wan

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Ed Saleh
Subject: Re: Optional Curly Braces in JavaScript Hi Ed! > Update to the proposal: > > Since we can't make spaces in JavaScript, the best we can do is use '_' > instead. You misunderstood. We *could* make use of significant whitespace in JavaScript (enabled by the `:` instead of a

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Ed Saleh
Subject: Re: Optional Curly Braces in JavaScript Hi Ed! > Update to the proposal: > > Since we can't make spaces in JavaScript, the best we can do is use '_' > instead. You misunderstood. We *could* make use of significant whitespace in JavaScript (enabled by the `:` instead of a

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Bergi
Hi Ed! > Update to the proposal: > > Since we can't make spaces in JavaScript, the best we can do is use '_' > instead. You misunderstood. We *could* make use of significant whitespace in JavaScript (enabled by the `:` instead of a brace after a statement) - we just don't *want* to. That said,

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Ed Saleh
Any identifier that can implement this feature is great. From: es-discuss on behalf of Ed Saleh Sent: Sunday, November 3, 2019 2:49:35 PM To: Sanford Whiteman ; es-discuss Subject: Re: Optional Curly Braces in JavaScript If it's not possible to get around

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Ed Saleh
If it's not possible to get around that, double underscore `__` or more `_{2,}` can be used. From: es-discuss on behalf of Ed Saleh Sent: Sunday, November 3, 2019 2:47:13 PM To: Sanford Whiteman ; es-discuss Subject: Re: Optional Curly Braces in JavaScript

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Ed Saleh
. `1_000_000` rather than `100`, but here we have a context of numbers, not expressions or statements. From: es-discuss on behalf of Sanford Whiteman Sent: Sunday, November 3, 2019 2:41:03 PM To: es-discuss Subject: Re: Optional Curly Braces in JavaScript

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Sanford Whiteman
The single character _ *is already a valid identifier* as Ron said. And not an obscure one (not that that would matter) but rather *the global object used by the Underscore library*. You might as well be using $ here and trying to convince people to stop using it as the top level of

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Ed Saleh
`,,`. From: Ron Buckton Sent: Sunday, November 3, 2019 2:12:23 PM To: Ed Saleh ; Sanford Whiteman ; es-discuss Subject: Re: Optional Curly Braces in JavaScript The '_' isn't necessary for chaining expressions, as ',' would already suffice: ``` if (foo==2) bar(), bar2

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Ron Buckton
019 10:48:12 AM To: Sanford Whiteman ; es-discuss Subject: Re: Optional Curly Braces in JavaScript Update to the proposal: Since we can't make spaces in JavaScript, the best we can do is use '_' instead. We will also git rid of ':' after statement in the old version as '_' is enough indication

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Ed Saleh
To: Sanford Whiteman ; es-discuss Subject: Re: Optional Curly Braces in JavaScript Update to the proposal: Since we can't make spaces in JavaScript, the best we can do is use '_' instead. We will also git rid of ':' after statement in the old version as '_' is enough indication and it's more compatible

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Ed Saleh
-discuss Subject: Re: Optional Curly Braces in JavaScript > the only thing really missing (and which python has) is a builtin > wasm-sqlite3 library (and specialized/secure file-api's to persist > sqlite-db-blobs). Browsers (WPWG, not this group) tried WebSQL. It failed because the

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread Sanford Whiteman
> the only thing really missing (and which python has) is a builtin > wasm-sqlite3 library (and specialized/secure file-api's to persist > sqlite-db-blobs). Browsers (WPWG, not this group) tried WebSQL. It failed because there wasn't a competitive bake-off with any other implementations _besides_

Re: Optional Curly Braces in JavaScript

2019-11-03 Thread kai zhu
> Python is so broadly used in those fields due to good library support javascript in modern browsers has good builtin-api support for most ux-scenarios you can think of. the only thing really missing (and which python has) is a builtin wasm-sqlite3 library (and specialized/secure file-api's to

Re: Optional Curly Braces in JavaScript

2019-11-02 Thread Sanford Whiteman
> I don't see any reason why Python is widely used in math and > science… Should talk to longtime Python peeps about it, it's not just "easy" or they'd be using VB6! Let me leave this here: Python has had bignum (arbitrary precision Integers) since 2008. Even before that, it had Long

Re: Optional Curly Braces in JavaScript

2019-11-02 Thread Isiah Meadows
nce, and > specially AI, other than this reason. It's easy to write and prototype in. > -- > *From:* Jordan Harband > *Sent:* Saturday, November 2, 2019 9:23:31 PM > *To:* Ed Saleh > *Cc:* Bergi ; es-discuss ; kai > zhu > > *Subject:* Re: Optional Cu

Re: Optional Curly Braces in JavaScript

2019-11-02 Thread Ed Saleh
Subject: Re: Optional Curly Braces in JavaScript I don’t think the obstacle to JavaScript becoming more widespread is mandatory curly braces, nor do i think any part of python’s popularity is due to optional curly braces. Separately, how are you measuring “widespread”? One measurement might

Re: Optional Curly Braces in JavaScript

2019-11-02 Thread Jordan Harband
for this specific reason, as it's easy to write for all > types of people. > > Thank you all, > -- > *From:* es-discuss on behalf of kai zhu < > kaizhu...@gmail.com> > *Sent:* Saturday, November 2, 2019 8:06:50 PM > *To:* Jordan Harband &g

Re: Optional Curly Braces in JavaScript

2019-11-02 Thread Ed Saleh
es-discuss on behalf of kai zhu Sent: Saturday, November 2, 2019 8:06:50 PM To: Jordan Harband Cc: Bergi ; es-discuss Subject: Re: Optional Curly Braces in JavaScript unlike python, many [client-side] javascript programs require rollup/minification into a single dist-file. removing curly br

Re: Optional Curly Braces in JavaScript

2019-11-02 Thread kai zhu
unlike python, many [client-side] javascript programs require rollup/minification into a single dist-file. removing curly braces (just like asi) makes that task more difficult. this is also why esm-import-statements were a terrible idea. ppl like me would argue frontend-programs (which are

Re: Optional Curly Braces in JavaScript

2019-11-02 Thread Jordan Harband
My preference would be to make them required in the places they're currently optional :-) Optional curly braces have led to many bugs, not just in JS (the "goto fail" SSL bug, for example) - why is this risk worth making it easier to write code on a whiteboard, where it doesn't need to be valid

Re: Optional Curly Braces in JavaScript

2019-11-02 Thread Bergi
Hello Ed! > That would make JavaScript an easy to write on board language, where a > language like python dominates because of it's simplicity in writing. This > would make JavaScript spread into more areas in science, education and > engineering. You seem to not only want to make block