3 ms·
OTOH it's nice to be able to do: try { // 500 lines catch (e) { return 4; }
by fctorial 7y ago
OTOH it's nice to be able to do:
try {
// 500 lines
catch (e) {
return 4;
}
- Twisol 7y agoOften, even functional languages have something similar, whether it's call/cc or something more cutting-edge like algebraic effects. All of these essentially augment the execution environment in various interesting ways, and are enhanced by other features of functional languages like immutability. (More pithily: try/catch is not inherently non-functional.)
- mac01021 7y agoAs a mere mortal reading the code, I would rather not have to reason about try blocks longer than a couple of lines.