<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Thank you for your feedback.</p>
<p><br>
</p>
<p>My motivation was a method where x and y coordinates came from different sources, and I didn't found it beautiful to separate and reassemble them. The snippet looks up a cell by the x coordinates of a column header and the y coordinates of a row header:</p>
<p><br>
</p>
<p><img size="74844" contenttype="image/png" id="img439721" style="max-width: 99.9%; user-select: none;" contextid="img890722" tabindex="0" src="cid:5dbe2728-9c02-448f-9186-40065cc967d5"><br>
</p>
<p><br>
</p>
<p>I now see that Interval>>#@ might be confusing, respecting the implementation in SequenceableCollection ...</p>
<p><br>
</p>
<p>> <span style="font-size: 12pt;">@ is not intuitive at all. Why would one expect to get 2 @ 3 corner: 4 @ 6 </span></p>
<div>> instead of 2 @ 3 extent: 4 @ 6?<br>
</div>
<div><br>
</div>
<div>In my view, because in the expression 2 to: 4, 4 stands for the absolute end of the interval but not the relative size.</div>
<div><br>
</div>
<div>How would you think about the following protocol?</div>
<div><br>
</div>
<div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<font size="3"><span style="font-size: 12pt;">r := Rectangle horizontal: (2 to: 3) vertical: (4 to: 6).</span></font></div>
<div style="font-family: Calibri, Helvetica, sans-serif, serif, EmojiFont; font-size: 16px;">
<font size="3"><span style="font-size: 12pt;">r horizontalRange; verticalRange.</span></font></div>
</div>
<p></p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Nicolas Cellier <nicolas.cellier.aka.nice@gmail.com><br>
<b>Gesendet:</b> Samstag, 10. August 2019 23:20:13<br>
<b>An:</b> The general-purpose Squeak developers list<br>
<b>Betreff:</b> Re: [squeak-dev] [Squeak protocol] Proposal: Interval>>#@</font>
<div> </div>
</div>
<div>
<div dir="auto">In my images i often use xCollection @ yCollection to create a (proxy) collection of points (for curves).</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">Le ven. 9 août 2019 à 22:39, Levente Uzonyi <<a href="mailto:leves@caesar.elte.hu">leves@caesar.elte.hu</a>> a écrit :<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Fri, 9 Aug 2019, Christoph Thiede wrote:<br>
<br>
> Hi all,<br>
><br>
> in a recent project, we introduced a shorthand for creating rectangles:<br>
><br>
><br>
><br>
> As applying @ on two numbers converts them into a point, I think it would be<br>
> somehow analogical to apply @ on two ranges to convert them into a<br>
> rectangle. Above all, I experienced enough cases where I personally find it<br>
> much more convenient to create a rectangle using<br>
> (2 to: 4) @ (3 to: 6)<br>
<br>
@ is not intuitive at all. Why would one expect to get 2 @ 3 corner: 4 @ 6 <br>
instead of 2 @ 3 extent: 4 @ 6?<br>
<br>
Also, why not just use #rect:? The comment says "This is the most general <br>
infix way to create a rectangle.".<br>
<br>
Levente<br>
<br>
> instead of<br>
> 2 @ 3 corner: 4 @ 6.<br>
><br>
> On the other hand, it is a bit weird that [(2 to: 4) @ (3 to: 5)] would<br>
> produce a different output than [(2 to: 4) asArray @ (3 to: 5)]. But imho<br>
> the rectangle construction would just be more intuitive. In general, are<br>
> there any real senders of SequenceableCollection>>#@ which could not just<br>
> call [aCollection with: anotherCollection collect: #@]?<br>
><br>
> Looking forward to your opinions :)<br>
><br>
> Best,<br>
> Christoph<br>
><br>
><br>
><br>
> --<br>
> Sent from: <a href="http://forum.world.st/Squeak-Dev-f45488.html" rel="noreferrer noreferrer" target="_blank">
http://forum.world.st/Squeak-Dev-f45488.html</a><br>
<br>
</blockquote>
</div>
</div>
</body>
</html>