I figuered out branch prediction is something out of predictability of a real software engineer working on top of a compiler in a higher level language... And I remembered Bill Gates writing self modifing code in the early MS-DOS days ...<p>Is it worthwile to introduce the (no) return statement in C++, Java, JavaScript and Kotlin with the following semantics:<p>(no) return; // pulls the top stack frame<p>(no) return all; // proceeds right after a call into recursion<p>(no) return 5; // pulls al frames such as the next return will jump to the fifth frame<p>(no) return -7; // pulls seven stack frames<p>Thanks a lot, community!<p>I enjoy ever visit and gained a lot of insight into my profession and beyond from all of you. Thank you very much.<p><typecast>
I'm not sure what you want, but Racket/Scheme (and perhaps Clojure) have continuations that can be used for something similar [1]. Perhaps you need continuation marks and advanced macrology, that I'm afraid of.<p>> <i>(no) return all; // proceeds right after a call into recursion</i><p>What about f -> g -> f -> g -> f -> g -> f -> g -> f ?<p>And f -> g -> f -> g -> f -> X -> f -> g -> f -> g -> f ?<p>[1] <a href="https://docs.racket-lang.org/guide/conts.html" rel="nofollow">https://docs.racket-lang.org/guide/conts.html</a>