<div dir="ltr">Since the returned object is not known from the method name inflate,  one must read the method inflate: to get what is happening here.<div><br></div><div>That's my point of view. Pun intended. Ha ha</div><div><br></div><div>Fun discussion</div><div><br></div><div>Cheers,</div><div>Karl</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Dec 5, 2018 at 11:44 PM Jakob Reschke <<a href="mailto:forums.jakob@resfarm.de">forums.jakob@resfarm.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>With #extent: and #corner: we "just know" that these are for creating Rectangles. Just like we have learned that the symbol + is not about two things crossing, but about adding things together, especially when it is surrounded by numbers. Creating a new "well-known" word from the very beginning is harder and you suddenly realize that all of the selectors without "rectangle" in their name only make sense when you assume a 2D graphics environment as the context, as opposed to, well, banking software, maybe? But since the class Point is for 2D coordinates in such an environment anyway, this can be justified.<br></div><div><br></div>Maybe you should ask yourself how you would like the expression to read if it were the printString of the Rectangle. And when you think about it, switch on and off in your mind the assumption that you already know you are creating a rectangle when you evaluate the result. For #extent:, you have to assume that, don't you? Otherwise 5@5 extent: 10@10 could also be a circle... interestingly, then I would assume it to be centered at 5@5 already. 5@5 corner: 10@10 seems less ambiguous to me. After all, circles don't have corners...<div><br></div><div>(0@0 extent: 10@10) printString</div><div>==> '5@5 inflate: 10@10' ? Does not seem natural to me. This relates to Nicolas's verb vs. noun argument.</div><div>==> '5@5 surroundedBy: 10@10'</div><div>==> '5@5 inTheMiddleOf: 10@10' (well, misleading example... think of '50@50 inTheMiddleOf: 10@10' instead)</div><div>==> '5@5 amidst: 10@10'</div><div>==> '10@10 around: 5@5'</div><div>==> '10@10 withCenter: 5@5'</div><div>==> '10@10 centeredAt: 5@5'</div><div>(repeating other's suggestions now, purposely uncommented)</div><div>==> '5@5 extendTo: 10@10'</div><div>==> '5@5 spreadTo: 10@10'</div><div>==> '5@5 spreadToExtent: 10@10'</div><div>==> '5@5 rectangleWithExtent: 10@10'</div><div>==> '10@10 asRectangleCentredAt: 5@5'</div><div>==> '5@5 centredRectangleWithExtent: 10@10'</div><div>==> '5@5 centredRectangleExtent: 10@10'</div></div><br><div class="gmail_quote"><div dir="ltr">Am Mi., 5. Dez. 2018 um 22:32 Uhr schrieb Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com" target="_blank">nicolas.cellier.aka.nice@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">Le mer. 5 déc. 2018 à 16:59, Tm Jhnsn <<a href="mailto:digit@sonic.net" target="_blank">digit@sonic.net</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
On Dec 4, 2018, at 12:12 AM, marcel.taeumel wrote:<br>
<br>
> Yet, such an infix notation for rectangle creation would not be  <br>
> much of an<br>
> improvement over Rectangle class >> center:extent:.<br>
><br>
> Very interesting. :-) Thoughts?<br>
<br>
Balloons inflate, and Smalltalk is quite associated with balloons... :)<br>
<br>
Tim J<br></blockquote><div><br></div><div>But in this case, should deflate return the center ? (100@100 inflate: 50@30) deflate.</div><div>I like spread because there is a kind of isotropic notion, we extend in all directions...</div><div><br></div><div>The lexical field of symmetry may fit: we construct a rectangle by taking those two vertices:<br></div><div>- image of aPoint by symmetry around myself,</div><div>- and aPoint.</div><div>So it's somehow a mirroring action:</div><div><br></div><div>    centerPoint mirror: cornerPoint.</div><div>    centerPoint reflect: cornerPoint.<br></div><div><br></div><div>We could also think of pivoting or unfolding in the 3rd dimension...<br></div><div>But I find the intention very hard to grasp... It's not obvious that the message should answer a Rectangle rather than a Point.</div><div>And the meaning of argument slipped from extent to corner which is a different action...</div><div><br></div><div><div>I note that inflate, spread, etc... are verbs, while corner: and extent: are nouns...</div></div><div>We understand corner: and extent: because we may think of them as attributes of a Rectangle... (or just because we're used to them?)<br></div><div>In this case, diagonal: may fit too, but the difference with extent: is thin, and I don't find the notion of isotropic spread in it.</div><div>In fact, diagonal: might be to vertex:vertex: what corner: is to origin:corner: because we can define a rectangle by any of its diagonals...</div><div><br></div><div>Geometrically, we may also see self and extentPoint as defining the diagonal by a center and a diameter of circumscribing circle...</div><div>So its a kind of circumExtent: that we pass to the center... Not very clear that it will answer a Rectangle...<br></div><div><br></div><div><br></div><div><br></div><div><br></div></div></div>
<br>
</blockquote></div>
<br>
</blockquote></div>