Friday, August 31, 2007

Checked exceptions

Java programmers might be interested. Here is an article interviewing Bruce Eckel about the pitfalls of checked exceptions. Personally, I like checked exceptions -- while Eckel argues that the API designer is unnecessarily putting handcuffs on the API user, I think that's the nature of what an API designer does anyway -- he specifies how you have to use the interface, in detail, and that's what you have to do if you want to use his interface. It would be nice if I could leave arguments out and change the calls around to be more convenient in my code, but I'm not allowed to.

Perhaps I've just read too much production code in my career that had almost no error checking.

No comments: