Do-Expressions Proposal Stalled?
isiahmeadows at gmail.com
Thu Jan 18 08:52:17 UTC 2018
First, that's something you could enforce in a linter. Second, just as
a heads up, `if`/`else` as an expression is actually pretty common -
consider Ruby as one example of this in a very procedural language.
me at isiahmeadows.com
Looking for web consulting? Or a new website?
Send me an email and we can get started.
On Thu, Jan 18, 2018 at 3:29 AM, Naveen Chawla <naveen.chwl at gmail.com> wrote:
> Oh, and also, I don't like the idea of allowing if-elses to be turned into
> expressions. That's what ternaries are for. Again, this harms readability
> and is another surface area for the "accidental code after last executed
> statement" bug I mentioned in my last post.
> On Thu, 18 Jan 2018 at 13:53 Naveen Chawla <naveen.chwl at gmail.com> wrote:
>> Also, I don't find it very readable/clear when reading it in code. Maybe
>> I'm missing the whole point, but the comma operator forces you to wrap each
>> non-expression language construct (e.g. for loops) into a function, which
>> makes the expression itself clearer (in my opinion) than a do-expression.
>> Also, it's very easy to accidentally add code after the last statement,
>> breaking the code and hence causing bugs!
>> This is not as much the case with the comma operator, since you have to
>> add a comma, which is not "normal" in ordinary function code vs a semicolon)
>> Altogether, I'd be happier if it wasn't introduced.
>> On Thu, 18 Jan 2018 at 13:29 Naveen Chawla <naveen.chwl at gmail.com> wrote:
>>> I'm not necessarily in favour of the proposal. I think the comma operator
>>> On Thu, 18 Jan 2018 at 01:58 Peter Jaszkowiak <p.jaszkow at gmail.com>
>>>> It appears that the do-expressions proposal, which has a high amount of
>>>> interest, is currently inactive. There haven't been any contributions from
>>>> @dherman since September.
>>>> This concerns me because the proposal is a hugely simplifying feature,
>>>> which would make the language much more concise.
>>>> Currently there are multiple instances of duplicate issues and the lack
>>>> of input means the proposal is going nowhere.
>>>> What's going on?
>>>> es-discuss mailing list
>>>> es-discuss at mozilla.org
> es-discuss mailing list
> es-discuss at mozilla.org
More information about the es-discuss