News for hackers. Stuff that matters.
Re:The Evolution of C Programming Practices: A Study of Unix... by samatman on Friday May 11, 2018 @11:40AM (#17048146)
Lua added goto just recently, and it's benign, because it can't escape its calling context.

Users were agitating for `continue` to join `break` for control flow interruption. Lua instead chose to provide all the non-structured control flows you would like as a primitive; scoping it lexically keeps it from breaking composition.

Re:The Evolution of C Programming Practices: A Study of Unix... by ufo on Friday May 11, 2018 @12:05PM (#17048426)
I still hope that we might be able to convince the Lua authors to add continue one day. It would be very convenient.

I think the real reason why it hasn't been added to the language yet is that it has a weird interaction with the way Lua scopes its repeat-until loops. The justification about having a single control-flow structure is more of an excuse.

Re:The Evolution of C Programming Practices: A Study of Unix... by samatman on Friday May 11, 2018 @05:42PM (#17050977)
As a contrasting opinion, I would like the break keyword to be formally defined as a sugar for a special labeled goto.

Since it's a keyword, you can't create your own ::break:: label, so that would be fine.

Re:The Evolution of C Programming Practices: A Study of Unix... by ufo on Saturday May 12, 2018 @11:54AM (#17054625)
I'd be OK with that. But let me type `break` and `continue`, with all the sugar that entails :)