News for hackers. Stuff that matters.
Re:Isaacs: try/catch is an anti-pattern by aufreak3 on Monday November 14, 2011 @10:12AM (#3234243)
Spot on, but CL's error generation/capture/recovery mechanism only helps in single-threaded code composition. Erlang's model of linking up processes so that a "supervisor" process get notified if a servant dies is the counterpart in a concurrent scenario. Together, they seem to me to cover most of the ground.

Furthermore, in Haskell you can throw an exception to another thread, though I'm not sure whether that's any more valuable as a design tool than a plain message passing channel. (see also "throwTo & block statements considered harmful" http://www.haskell.org/pipermail/haskell-cafe/2006-December/...)

Go's "defer" is nice syntax btw.

Re:Isaacs: try/catch is an anti-pattern by jwr on Thursday November 17, 2011 @03:25AM (#3246913)
Good point! I never actually considered this, because almost all Common Lisp code I wrote was single-threaded (CL and threads aren't friends), and nowadays I write in Clojure, where I just stick to fairly plain catch/throw.

This is a great example of why it is always worth it to learn various languages, not just stick to what you know. You regularly get eye-opening revelation moments.