[ENH] Complex
Stéphane Rollandin
lecteur at zogotounga.net
Tue Jul 20 16:35:50 UTC 2004
> Thus Complex is somewhat similar to a Number but it is not a subclass of
> it. Some operations
> we would like to inherit (e.g. #abs, #negated, #reciprocal) but some of
> the Number operation
> do not have sens to inherit or to overload. Classes are not always neat
> mechanism.
>
> !!!!!! We had to COPY the implementation of the
> abs
> negated
> reciprocal
> log:
> isZero
> reciprocal
> ...
> methods from the Number class to the Complex class. Awful solution. Now
> I begin to
> appreciate the Self.
>
... looks like a job for Traits :)
Stef
More information about the Squeak-dev
mailing list
|