anAnyClass scaleBy:<foo>. What should <foo> be?

Reinier van Loon R.L.J.M.W.van.Loon at inter.nl.net
Fri Sep 3 07:49:18 UTC 1999


John-Reed,

>I am making modifications to the scaleBy: method in
>class Path. That method is scaling points but does not use the
>class Point scaleBy: method and I think that it should.
[snip]

>checkScale: aScale
> "Convert aScale to the internal format of a floating-point Point."
>
> | checkedScale |
> checkedScale _ aScale asPoint.
> ^checkedScale x asFloat @ checkedScale y asFloat
>
>--- end quote
>
>it seems to me that scaleBy: aFloatingPointPoint should be the
>standard. Yes? No? Maybe?
>

If you're going to make modifications why not rename scaleBy: to scaledBy:
as the receiver does not get scaled but answers itself scaled by aScale.
Same for transformBy:. That would be nice standards. Just this week a
trainee was completely confused by this. She expected the object to scale
but found nothing happened. After I explained the 'name' bug she looked a
bit funny at me...

Regards, Reinier





More information about the Squeak-dev mailing list