Tuesday, September 23, 2003

Artima is interviewing James Gosling

His new Jackpot project to produce graphical representations of programs sounds very interesting.

And On checked exceptions too.

Gosling : the knowledge of the situation is always fairly localized. When you try to open a file and it's not there, you're coping strategy is really determined by what you were going for. Some guy miles away isn't going to know what to do. The code that tried to open the file knows what to do, whether it be trying a backup file, looking in a different directory, or asking the user for another filename.

I'm not sure I totally buy this. When you're writing a library you often don't know what to do in the case of an exception. Is the library being called in a GUI where prompting the user through a pop-up is the right response? Or on a web-server where redirecting to an error page is the right response. Is the error caused by a user activity which requires the user to be informed or programmer stupidity which should result in a screaming crash to alert the programmer something's wrong.

Really exception handling is a problem for Aspect Oriented Programming where context sets parameters which are woven throughout the code.

No comments: