<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>The missing code snippet was</p>
<p><br>
</p>
<p><span style="color: rgb(51, 51, 51); font-family: monospace; font-size: 10.92px; white-space: pre;">Interval>>@ verticalInterval ^ Rectangle left: self start right: self stop top: verticalInterval start bottom: verticalInterval stop</span><span style="color: rgb(51, 51, 51); font-family: monospace; font-size: 10.92px; white-space: pre;">
</span></p>
<div><span style="font-size: 12pt;">(I just inserted it into the history)</span><br>
</div>
<div><span style="font-size: 12pt;"><br>
</span></div>
<div><span style="font-size: 12pt;">Other proposals for creating Rectangles:</span></div>
<div><span style="font-size: 12pt;"><br>
</span></div>
<div><span style="font-size: 12pt;">r := Rectangle horizontal: (2 to: 3) vertical: (4 to: 6).</span></div>
<div><span style="font-size: 12pt;">r horizontalRange; verticalRange.</span></div>
<div><span style="font-size: 12pt;"><br>
</span></div>
<div><span style="font-size: 12pt;">Illustratively, Rectangle>>#intersects: could answer</span></div>
<p></p>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<p></p>
<div><span style="font-size: 12pt;">(self horizontalRange intersects: aRectangle horizontalRange) and: [self verticalRange intersects: aRectangle verticalRange].</span></div>
<p></p>
</blockquote>
<p></p>
<div><span style="font-size: 12pt;">(I do not want to change this optimized implementation, this is only one possible use case for the change.)</span></div>
<div><span style="font-size: 12pt;"><br>
</span></div>
<div><span style="font-size: 12pt;">Best,</span></div>
<div><span style="font-size: 12pt;">Christoph</span></div>
<p></p>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Thiede, Christoph<br>
<b>Gesendet:</b> Freitag, 9. August 2019 21:55 Uhr<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org<br>
<b>Betreff:</b> [squeak-dev] [Squeak protocol] Proposal: Interval>>#@</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hi all,<br>
<br>
in a recent project, we introduced a shorthand for creating rectangles:<br>
<br>
<span style="color: rgb(51, 51, 51); font-family: monospace; font-size: 10.92px; white-space: pre;">Interval>>@ verticalInterval ^ Rectangle left: self start right: self stop top: verticalInterval start bottom: verticalInterval stop<br>
</span><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>
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" id="LPlnk151413" previewremoved="true">
http://forum.world.st/Squeak-Dev-f45488.html</a>
<div id="LPBorder_GT_15653806312740.6131486566605422" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_15653806312690.7246562052721071" role="presentation" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_15653806312720.7799065527063536" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_15653806312720.2216202349386598"></div>
<div id="LPTitle_15653806312720.6508381089731601" style="top: 0px; color: rgb(36, 96, 118); font-weight: 400; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_15653806312730.8446351106434646" href="http://forum.world.st/Squeak-Dev-f45488.html" target="_blank" style="text-decoration: none;">Smalltalk - Squeak - Dev | Mailing List Archive</a></div>
<div id="LPMetadata_15653806312730.4736639298014844" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: 400; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
forum.world.st</div>
<div id="LPDescription_15653806312730.36055898536469666" style="display: block; color: rgb(102, 102, 102); font-weight: 400; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
Squeak - Dev forum and mailing list archive. The general-purpose Squeak developers list</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>