2 ms·
> Extreme terseness, even when done very elegantly, makes programs very hard to read and sometimes also hard to maintain. The advantage to something like call/
by duped 3y ago
> Extreme terseness, even when done very elegantly, makes programs very hard to read and sometimes also hard to maintain.
The advantage to something like call/cc is not that you can make code extremely terse but rather that there is one code path for analyzing control flow and each variant of control flow isn't a special case. It's also not more terse at all, but rather more explicit.
You don't need to force users to use it, but it is useful to define more useful mechanisms like if/else if, match/switch, throw/catch/finally, coroutines, etc in terms of an abstraction that doesn't break type checking or codegeneration.
All that said "call/cc considered harmful" is an old take