4 ms·
Regarding the ruby example, thinking about the performance of such a (non-)feature makes my head spin. Not to mention the possibility of side-effects wrecking t
by DarkWiiPlayer 8y ago
Regarding the ruby example, thinking about the performance of such a (non-)feature makes my head spin. Not to mention the possibility of side-effects wrecking the program state and the complexity of debugging code like that without making Rubys error handling aware of such a construct.
All in all, this seems like a fun hack, but a catastrophically bad idea in practice.
- camtarn 8y agoThere's some discussion about removing callcc from the language here: https://bugs.ruby-lang.org/issues/10548 https://bugs.ruby-lang.org/issues/10548 It looks like it's still included at the moment, though: http://ruby-doc.org/core-2.6.1/Kernel.html#method-i-callcc http://ruby-doc.org/core-2.6.1/Kernel.html#method-i-callcc
- sacado2 8y agoThis is an NP-complete problem, so performance will be an issue anyway.