You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • To be fair, it's difficult to implement efficiently and I think labels are generally considered to be bad practice now (which is what we say in the docs). You're the first person to request the functionality in a very long time, so I think it probably was the right decision.

    Having said that, it's all open so if you felt like adding labels to the parser yourself and could do that without impacting the performance in other areas, I'd be very happy to accept a PR!

    Since Espruino executes in-place right now there's no optimisation pass. However if your reason for using break was for speed then I'm afraid you're likely to be disappointed. Espruino's execution speed really isn't all that spectacular.

    It is however possible to include C functions inside your code, so if you want to use labels or any other C-like functionality and be super fast that's always an option https://www.espruino.com/InlineC

About

Avatar for Gordon @Gordon started