4 ms·
Exception Handling in Programming Languages [video]
- lispm 8y agoKind of sad to see that the discussion was mostly about topics like Java's checked exceptions and/or stack traces. Object-oriented exceptions, non-terminating, with handlers and restarts: http://www.nhplace.com/kent/Papers/Exceptional-Situations-1990.html http://www.nhplace.com/kent/Papers/Exceptional-Situations-19...
- kjeetgill 8y agoHaha, agreed. It was a conversation between Hotspot (aka "the" JVM) developers at jcrete though, so I guess that's understandable.
- kjeetgill 8y agoI think checked exceptions get a bad rap, but Cliff makes a good point: defaults matter and rethrowing should be the default. go's error codes are better than in C but just act like "all exceptions are checked" from a Java angle. I think checked exception make sense at module boundries. If I'm calling into Zlib or Guava, their function's type signatures should call out error modes and thus be checked. That's my "solution": keep checked exceptions based on the function signature but NOT based on the exception type. It's roughly what best practices are now. Wrap it in runtime. I think Optional/Either/Try/Manad versions boil down to about this same scheme.