[squeak-dev] Re: Complex isNumber

nicolas cellier ncellier at ifrance.com
Tue Mar 11 23:03:25 UTC 2008


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
> 

Possibly.
Again same argument about *.

We all expect 1 i * 1 i = -1.
Though few will name such an operation *:
{a. b} asVector * {c. d} asvector = {a*c-(b*d). a*d+(b*c)} asVector

Nicolas




More information about the Squeak-dev mailing list