4 ms·
There's a couple of JS transformers/macro languages (and other languages that compile to JS) that can implement lexical return more than one frame up the stack
by sedachv 15y ago
There's a couple of JS transformers/macro languages (and other languages that compile to JS) that can implement lexical return more than one frame up the stack using continuation-passing style. But that's even uglier than using exceptions. I added RETURN-FROM to Parenscript late last year (it's in the latest release: http://common-lisp.net/project/parenscript/ http://common-lisp.net/project/parenscript/) and in all the interesting cases it has to use catch/throw, but it tries to optimize that into a normal return sequence when it can.