On #ifError: considered harmful was Re: Set>>add:
Allen Wirfs-Brock
Allen_Wirfs-Brock at Instantiations.com
Wed Nov 13 19:16:17 UTC 2002
I have only a minor refinement to John Sarkela 's excellent analysis of the
use of exceptions in this situation:
Because of the propensity of people to write;
[...] on: Error do:...
I would make CollectionError a refinement of Notification rather than
Error. In addition, I would be inclined to name it QuestionableUsage (or
QuestionableCollectionUsage if you feel the need to be more specific.)
Regarding, the ANSI spec. stating that Set>>add: is undefined for nil
arguments. There are at least two different reasons why that choice may
have been made (and I don't recall which was the actual reason):
1) Different existing (in 1998) implementations did different things
2) All existing implementation did the same thing but the committee had
reservations about that definition and wanted to leave room for future
implementations to do something different.
Allen_Wirfs-Brock at Instantiations.com
More information about the Squeak-dev
mailing list
|