[BUG]Collection>>removeAll:
Marcel Weiher
marcel at metaobject.com
Mon Aug 26 10:43:52 UTC 2002
On Monday, August 26, 2002, at 02:07 Uhr, Richard A. O'Keefe wrote:
> "Andrew C. Greenberg" <werdna at mucow.com> wrote:
> I don't know about this Richard. #removeAll: implies certain
> side-effects with respect to the receiver that render its meaningful
> definition undefined when the parameter is modified during its
> operation.
>
> I wish people wouldn't use the term "SIDE-effect" for what is the
> MAIN effect of an operation.
I do wish you'd stop the shouting. This is a technical forum, you can
use big words.
Anyway, side-effect is a technical term for changes to some state,
versus returning a (new) result.
A large part of imperative programming is programming-by-side-effects.
> It's an important distinction.
It is just wrong in this instance, because side-effect is a
well-understood technical term that means something different from what
you think it means.
> Now #removeAll:, though grossly inefficient, is in other ways a well
> behaved operation. It doesn't _have_ any side effects.
Yes it does. It empties the receiver. Its main-effect is achieved via
a side-effect.
[rest snipped]
Marcel
--
Marcel Weiher Metaobject Software Technologies
marcel at metaobject.com www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
More information about the Squeak-dev
mailing list
|