Barbara Liskov: Exceptions, Checked or Unchecked?
November 21, 2009
Wonderful talk by her for the local ACM chapter last night!
Barbara, as you may know, was very influencial for her work on
Abstract Data Types, and that is the major reason for her receiving
the award. (Oh, my! I do believe she's the first woman.)
It's kind of fun to look at the list and try to remember who did what.
http://awards.acm.org/homepage.cfm?srt=all&awd=140
I can tell you about 2/3 of them. I know ten of them.
Along with some amusing comments about the history of computing, she
made a few points that I recognized at relevant today.
As she talked about ADTs, it was clear that she was intermixing what
we now call subclasses with generics. They seem such radically
different concepts today, but apparently not then. I was curious about
that.
She made a big point about the value of an exception mechanism (it
astounds me that there are languages today without exceptions). And
she *seemed* to go on to say that what we would call "checked"
exceptions were the way to go. I expressed my doubts, noting how much
a pain in the a** it is to have to go change a dozen callers to throw
a new exception, just because you changed one little line low down.
Pains in the a**es generally lead to negative reactions, such as
declaring all methods to throw Exception, completely defeating the
purpose of having checked exceptions in the first place. I pretty much
always catch checked exceptions and embed them into an unchecked
exception and throw that up, also defeating the purpose of checked
exceptions.
(Someone next to me suggested that I misunderstood her answer to me
and that she was actually supportive of "unchecked" exceptions.)
I'd be curious to know if YOU are a checker or a unchecker.
-Bil