2 ms·
Yeah, but there's got to be a less needlessly overcomplicated way of doing this. It's ridiculous. As for call_cc (or to use its "real" name call/cc, or call-wi
by qwertyuiop924 10y ago
Yeah, but there's got to be a less needlessly overcomplicated way of doing this. It's ridiculous.
As for call_cc (or to use its "real" name call/cc, or call-with-current-continuation), my usual response to those that propose dropping call/cc (usually proposing shift/reset or similar as a replacement) is "over my dead body," but that's Scheme: supporting weird experiments is part of Scheme's job, and there's at least one high-quality implementation of Scheme that uses Cheney-on-the-MTA compilation, which makes call/cc fast enough for Real Work. In ruby, the situation is different: call/cc is slow, expensive, and Ruby is a language for getting stuff done, not academic experiments about control structure.