Dealing With Exceptions

Brian Rice water at
Tue Aug 17 02:13:01 UTC 1999

>And I realized that *whenever* I dealt with code that used an exception
>*aside* from the compile and runtime pain of exceptions run amuck (in
>Java). Just *READING* the code was distracting. When I thought "Let's you
>focus on the normal logic" I envisioned myself bounding about, free and
>happy, naively coding in the straightforward manner. Yay! I would only have
>to read methods that, without exceptions, should be burned at the stake for
>the lack of error-checking, etc.
>Of course, this is total fantasy. In really, try/catch, handle/do, signal,
>et al. are just more, and rather confusing, control structures. Boo!
>I would be delighted if the exception stuff were entirely orthoganal to
>regular code, the way that class and variable declarations are. Perhaps
>this can be entirely handled by clever parsing and display. I don't know.
>Maybe TextActions and hyperlinks are the solution. Or footnotes ;)
>(Grumble. I don't like what they do to the call stack, either :))

This is a good point to mention current Xerox PARC activities related to
Aspect-Oriented programming (AOP), where various orthogonal issues related
to code-generation are separated into "base" code and "aspect" code.  These
separate (but simple to write) code-specs are "weaved" deterministically
into a single piece of code that handles all of those issues just like a
good programmer would.  ECOOP covers this topic every year, and several
smalltalk implementations have been played with and discussed.  One
disadvantage is that aspects are specified statically, but there are more
dynamic ways that have been explored a little.  One was a smalltalk
implementation that included a MetaObject composition protocol.  I believe
that the implementation had a single MetaMetaObject intercept message-sends
to a given object and then pass the message to various MetaObjects
according to a deterministic strategy that could be dynamically modified.
(Check the ECOOP 99 AOP paper release; I don't have the URL handy).
Anyway, the Xerox group has as its ultimate goal to tackle
exception-handling via aspects or something similar.

More information about the Squeak-dev mailing list