Wow. Sun may have open-sourced Java in the past, but at this moment, the JVM seems like a more hostile platform than .Net.
For those who are curious which is the largest (island in a lake on an)^2 on an island. Because recursion isn’t just for programmers and computers.
It seems after much resistance to the idea, Go has added exception handling to the language in the form of defer, panic, and recover.
Don’t get me wrong, I think the’ve got something here. Defer gives you the equivalent of C#’s finally/using; or a nice subset of C++’s destructors; or Lisp’s unwind-protect. Panic = throw / raise. Recover = catch.
The blog post gives the impression that you can’t programmatically access the value passed to panic — “recover returns nil” — but before judging that behavior I should try to confirm it in the Go documentation.
All in all, I’m giving this design a thumbs up. No element of it is new, but they seem to have brought exception handling in without compromising their mantra of practical and simple.