4 ms·
We even already have a common keyword suitable for this: 'goto'.
by to3m 9y ago
We even already have a common keyword suitable for this: 'goto'.
- javajosh 9y agoheck you don't even need goto, just a labelled break, which is extremely well supported across languages (great comment btw i lol'd)
- sevensor 9y agoThis is an interesting point -- structured programming has made source code vastly easier to reason about, but at the cost of turning some obvious control structures into optimizations. The upshot is that we don't have some of the really terrible control structures that were enabled by goto. I once had the pleasure of reading through some old Fortran code that freely jumped into various points in the middle of a loop, from outside the loop. Took me ages to figure out what it was doing.