[squeak-dev] Re: Complex isNumber
nicolas cellier
ncellier at ifrance.com
Tue Mar 11 23:56:55 UTC 2008
nicolas cellier a écrit :
> Igor Stasenko a écrit :
>> Vector
>> |
>> ------------------------
>> | | |
>> Point | Point3D/Vector3D
>> Complex
>>
>> Why not move common behavior to Vector class, and make rest be
>> subclasses?
>>
>> Point class>>new
>> ^ super new: 2
>>
>> And few selectors like:
>> #isVector
>> #isScalar
>>
Also think that sooner of later, one will need to work in C^n rather
than R^n, so don't even expect instances of Number in inst.var.
I think we could learn much from Axiom. I remember they had to introduce
multiple hierarchies. Not exactly multiple inheritance, but something
better structured.
Nicolas
More information about the Squeak-dev
mailing list
|