Label statement moveable

Michał Wadas michalwadas at gmail.com
Tue May 26 09:13:47 UTC 2015


I'm not sure if limited "goto" should be really considered harmful.
Dijkstra has written his essay on unlimited goto, that could jump from
any point in code to any other point in code.
I don't see reason why limited "goto" that is semantically equivalent
(or little more powerful) to
x: do {
continue x;
} while(false);

should be considered harmful (anyway - it's useful almost only for
implementing state machines).


2015-05-22 4:14 GMT+02:00 Bob Myers <rtm at gol.com>:
> Sorry, I forgot the smiley on my post.
> Bob
>
>>> ---------- Forwarded message ----------
>>
>> From: Brendan Eich <brendan at mozilla.org>
>> To: Bob Myers <rtm at gol.com>
>> Cc: es-discuss at mozilla.org
>> Date: Thu, 21 May 2015 16:45:38 -0700
>> Subject: Re: Label statement moveable
>> Bob Myers wrote:
>>>
>>> Can we also get goto statements?
>>
>>
>> No, although an out-of-shipping-date Opera engine supported them.
>>
>>> Also, if we going to do gotos, then please implement computed GOTO.
>>> FORTRAN has had that already for like 50 years.
>>
>>
>> Sorry, JS is not Fortran. Goto considered harmful, Dijkstra said -- plus
>> naive Java verifier complexity is O(n^4) without extra stack/typemaps, due
>> to goto.
>>
>> G-O-T-O in JS is spelled "Proper Tail Calls" and is in ES6.
>>
>> /be
>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>


More information about the es-discuss mailing list