Subject: | Consider "else" block |
Some syntax like
try { ... }
catch { ... }
else {
# code gets run if an exception wasn't thrown
}
could be handy. There's times I want to run something only on successful completion. Analogous to the two-argument ->then method on Futures.
A contentious design point here is going to be the name. Python names it "else", but then Python also has "else" blocks on and for loops. I'd prefer not to reüse the "else" keyword here but instead invent a new one. I just don't have any good naming ideas.
Internet Bikeshed Go!
--
Paul Evans