In JavaScript there’s an inherent cost to a try/catch
it adds another stack scope (or some such), but apparently there’s no cost in NextBASIC (or indeed Sinclair BASIC):
Unlike some compiled stack-based languages, ON ERROR doesn’t make NextBASIC any slower.
-
Simon N Goodwin via [FB](https://www.facebook.com/groups/ZXNextBasic/?post_id=825486994644308\&comment_id=825499414643066\&reply_comment_id=825690884623919&cft%5B0%5D=AZVOmg-syf5ZyiBakldZPIJ3DXZxZ80l-eGRasR70WJtBI2PvZubZbdDP48faM2b8mVkGqMN7FxvIsMO_fViUgt19hM0LsnFK6LKU5ORTWmUtoJ4lBL3xZFvKTcbWPz9H0mJJSJtJNmUHJpKQmi24p6u&tn=R%5D-R)
Learned at 24-May 2020 @ 20:48 about spectrum. [Edit this post](https://github.com/remy/remysharp.com/blob/main/public/til/spectrum/doesnt-cost-to-try.md)