Set>>add:
Nevin Pratt
nevin at smalltalkpro.com
Sat Nov 9 13:36:30 UTC 2002
The final draft of the ANSI standard (and presumably the actual
standard) specifies that if the argument to #add: for Set is nil, the
results are undefined.
VisualWorks for this case just returns nil, and otherwise does nothing.
Squeak throws an exception.
GLORP appears to depend upon the VisualWorks behavior. Since GLORP has
been ported to VA and Dolphin, I'm guessing that they also have VW's
behavior. Thus, Squeak appears to be the odd-man out.
I personally am not a fan of exceptions, and use them very sparingly, if
at all. And in this case, I personally prefer VW's behavior.
But I was curious what anybody else thought about this difference.
Comments?
Nevin
More information about the Squeak-dev
mailing list
|