You are reading a single comment by @stephenPspackman and its replies. Click here to read the full conversation.
  • Espruino apparently does not implement labels because “they're generally considered bad practice”. Really? Goto is (still) broadly considered harmful, but JS does not provide goto; its labels are used for multilevel breaks (and continues), a feature that repairs the relative uselessness and occasional opacity of C's implicitly targeted break statements. It seems a little weird to implement break (which has also been argued against by control flow purists, though I think received opinion by now is that they were arguing more out of a desire to simplify their control flow analysis algorithms than any true readability problem) and not label.

    Anyway, I don't really mean to rant about language design philosophy, especially over a feature that I wouldn't notice was missing if it hadn't already been in the spec, but what's the recommended alternative on this platform?

About