[squeak-dev] The Trunk: Graphics-mt.404.mcz
marcel.taeumel
Marcel.Taeumel at hpi.de
Tue Dec 4 08:12:11 UTC 2018
Hi, there. :-)
I didn't put it into the inbox because 1) I wanted to speed up the
discussion and 2) thought this is a good name along Point >> #extent: and
#corner:. Whatever we choose to improve consistency here, those messages
should be considered, too.
<offtopic> Anyway, there is no such thing as "garbage version in the
ancestry". This is not George Orwell's 1984 where people dictate or rewrite
history. History becomes what has happened. If a database (back-end) or
algorithm gets confused with this kind of events, then that database has to
be fixed. Not the data. :-) Just my two cents. </offtopic>
Sorry for any inconveniences.
So, what do we have up to here:
- #inflate:, #extent:, #corner:
- #extendTo:, #extent:, #corner:
- #spreadTo:, #extent:, #corner:
- #spreadToExtent:, #extent:, #corner:
- #rectangleWithExtent:, #extent:, #corner:
- #centredRectangleWithExtent:, #extent:, #corner:
- #centredRectangleExtent:, #extent:, #corner:
Eliot suggests to maybe treat the point as extent, not position information:
- #asRectangleCentredAt:, (#asRectangleOriginAt:)
So far, I do not like any of the suggestions because I see the triple of
(?/#extent:/#corner:) as more important than the perfect wording for that
single new message that calls Rectangle class >> #center:extent:. It is no
option to rename (and deprecate) #extent: and #corner: because of existing
code.
Instead, we could introduce three (or four?) new messages that all improve
on the wording. Maybe:
#asRectangleOriginWithExtent:
#asRectangleCenterWithExtent:
#asRectangleOriginWithCorner:
#asRectangleCenterWithCorner:
Yet, such an infix notation for rectangle creation would not be much of an
improvement over Rectangle class >> center:extent:.
Very interesting. :-) Thoughts?
Best,
Marcel
Stéphane Rollandin wrote
>> Karl's is the only one that doesn't sound like the Rectangle is
>> supposed to be bigger. The other names seem to assume an "expansion",
>> which is not made by the implementation.
>
> The receiver is not a rectangle, it is a point. It is rather natural to
> think of going from a point to a rectangle centered at that point as an
> expansion of sort.
>
>
> Stef
--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html
More information about the Squeak-dev
mailing list
|