Eliot,<br><br>Really?&nbsp; No semicolons?... Why?... I thought that from<br><br>Bezier2Segment&gt;&gt;ellipseSegments<br><br>&nbsp; ^{all those 8 things}<br><br><br>one would have somewhere<br><br>&lt;blablabla&gt;<br>&nbsp; someBezier2Segment ellipseSegments do: aBlock<br>
&lt;blablabla&gt;<br><br><br>but then that would reduce to<br><br>Bezier2Segment&gt;&gt;ellipseSegmentsDo: aBlock<br><br>&nbsp; aBlock<br>&nbsp;&nbsp;&nbsp; value: seg1a;<br>&nbsp;&nbsp;&nbsp; (etc)<br>&nbsp;&nbsp;&nbsp; value: seg8a;<br>&nbsp;&nbsp;&nbsp; value: seg8b<br><br><br>What did I miss here?<br>
<br>Andres.<br><br><br><div class="gmail_quote">On Mon, Mar 24, 2008 at 6:45 PM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br><div class="gmail_quote"><div class="Ih2E3d">On Mon, Mar 24, 2008 at 6:18 PM, Andres Valloud &lt;<a href="mailto:andres.valloud@gmail.com" target="_blank">andres.valloud@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Eliot,<br><br>Re: the Bezier2Segment... if I remember correctly, the {} syntax creates a literal at compile time.&nbsp; Is that so?&nbsp; Or is the array created every time execution goes over {}?<br><br>In the case of Bezier2Segment, what I think is at times missing from consideration is what is usually done with such arrays... do: aBlock?&nbsp; Because if so, it would be cheaper (and *sometimes* clearer) to do:<br>


<br>Bezier2Segment&gt;&gt;ellipseSegmentsDo: aBlock<br><br>&nbsp; aBlock<br>&nbsp;&nbsp;&nbsp; value: seg1a;<br>&nbsp;&nbsp;&nbsp; value: seg1b;<br>
&nbsp;&nbsp;&nbsp; value: seg2a;<br>
&nbsp;&nbsp;&nbsp; value: seg2b;<br>
&nbsp;&nbsp;&nbsp; value: seg3a;<br>
&nbsp;&nbsp;&nbsp; value: seg3b;<br>
&nbsp;&nbsp;&nbsp; value: seg4a;<br>
&nbsp;&nbsp;&nbsp; value: seg4b</blockquote></div><div><br>Um, semicolons aren&#39;t what you mean.&nbsp; You want a Closure&gt;&gt;value:value:value:value:value:value:value:value: method (right?), and there isn&#39;t one.&nbsp; You have to use valueWithArguments:.&nbsp; But there isn&#39;t even an ArrayedCollection class&gt;&gt;with:with:with:with:with:with:with:with: method to construct one with(*).&nbsp; So once again a brace construct is the most convenient way to implement Closure&gt;&gt;value:value:value:value:value:value:value:value:.<br>

<br>(*) at least you can write ArrayedCollection class&gt;&gt;with:with:with:with:with:with:with:with:.&nbsp; You can&#39;t write Closure&gt;&gt;value:value:value:value:value:value:value:value:value: directly because it would be a primitive and either an 8-arg primitive may not be available or a varargs primitive may not accept more than 3 arguments.&nbsp; If you write it in terms of valueWithArguments: you still need Array class&gt;&gt;with:with:with:with:with:with:with:with: to construct the argument vector (or of course the convenient brace construct).<br>

<br> </div><div class="Ih2E3d"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">One could further wonder why are there so many of these seg* things floating around...</blockquote>

</div><div><br>Because sometimes things come in octets... <br></div><div><div></div><div class="Wj3C7c"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br>Just my opinion though,<br>
<font color="#888888">Andres.</font><div><div></div><div><br><br><br><div class="gmail_quote">On Mon, Mar 24, 2008 at 6:09 PM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt; wrote:<br>


<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><br><div class="gmail_quote"><div>On Sat, Mar 22, 2008 at 1:44 PM, Andres Valloud &lt;<a href="mailto:andres.valloud@gmail.com" target="_blank">andres.valloud@gmail.com</a>&gt; wrote:<br>


<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I think something that is being left unaddressed is whether using
literal arrays that allow code expressions (e.g.: the brace syntax in
Squeak) is a good practice or not.&nbsp; In my experience, I have not felt
the need for such things, but maybe I have not been exposed to
particular circumstances in which they become useful.&nbsp; Does anybody
have some slam dunk examples that can be shared so that we can evaluate
this better?</blockquote></div><div><br>Just open any recent Squeak image and broseer senders of #braceArray, e.g. the last line of<br>Bezier2Segment&gt;&gt;makeEllipseSegments: aRectangle in Squeak V3.9 reads<br><br>&nbsp;&nbsp;&nbsp; ^{seg1a. seg1b. seg2a. seg2b. seg3a. seg3b. seg4a. seg4b}<br>



<br>instead of<br>&nbsp;&nbsp;&nbsp; ^(Array with: seg1a with: seg1b with: seg2a with: seg2b),<br>&nbsp; &nbsp;&nbsp;&nbsp; (Array with: seg3a with: seg3b with: seg4a with: seg4b)<br><br>BTW, the first example tat comes up in my image contains:<br>&nbsp;&nbsp;&nbsp; {&#39;zip&#39;.&#39;sar&#39;.&#39;pr&#39;. &#39;mcz&#39;. &#39;*&#39;} includes: suffix<br>



which is better written as<br>&nbsp;&nbsp;&nbsp; #(&#39;zip&#39; &#39;sar&#39; &#39;pr&#39; &#39;mcz&#39; &#39;*&#39;) includes: suffix<br>so one can argue that it can be confusing for some to have two apparently similar constructs.&nbsp; But in my experience {} carries its weight (and there&#39;s no doubt that #() does).<br>



<br></div><div><div></div><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><font color="#888888">
<br>
Andres.<br><br></font><div class="gmail_quote"><div><div></div><div>On Tue, Mar 18, 2008 at 9:57 AM, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt; wrote:<br>

</div></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div><div>On Mon, Mar 17, 2008 at 2:11 PM, Craig Latta &lt;<a href="mailto:craig@netjam.org" target="_blank">craig@netjam.org</a>&gt; wrote:<br>





</div><div class="gmail_quote"><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
&nbsp;&gt; Defining new language elements is hard. &nbsp;The worst that could happen<br>
&nbsp;&gt; to this project, is to have extremely long threads with no conclusion<br>
&nbsp;&gt; as on the Squeak list.<br>
<br>
 &nbsp; &nbsp; &nbsp;Indeed, although for what it&#39;s worth there&#39;s no lingering debate<br>
there on this particular issue[1]. ;)<br>
<br>
<br>
-C<br>
<br>
[1]<br>
<br>
 &nbsp; &nbsp; &nbsp;Namely, the short form of...<br>
<br>
 &nbsp; &nbsp; &nbsp;Array with: #foo with: #bar<br>
<br>
is...<br>
<br>
 &nbsp; &nbsp; &nbsp;#(foo bar)<br>
<br>
as in Smalltalk-80, and the short form of...<br>
<br>
 &nbsp; &nbsp; &nbsp;Array with: #foo with: true<br>
<br>
is...<br>
<br>
 &nbsp; &nbsp; &nbsp;{#foo. true}</blockquote></div><div><br>Well, in Squeak 3.9 I get<br><br>Welcome to the finale version of 3.9 of 7 of November 2006<br>#(nil true false foo) collect: [:ea| ea class] {UndefinedObject . True . False . ByteSymbol}<br>






#(nil true false foo) printString &#39;#(nil true false #foo)&#39;<br><br></div><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&nbsp; &nbsp;&nbsp; But I suspect the appropriate standard use of curly brackets<br>

across multiple dialects is a whole other morass. :)</blockquote></div><div><br>Having been living with Squeak for a while now I really, really like the curly brace syntax.&nbsp; I also note that it doesn&#39;t conflict with e.g. VisualWorks use of #{name} for binding references.&nbsp; So I have a strong personal preference for it, but that&#39;s just personal.<br>






<br></div></div><br>
<br></div></div><div>_______________________________________________<br>
ANSI-Smalltalk mailing list<br>
<a href="mailto:ANSI-Smalltalk@lists.openskills.org" target="_blank">ANSI-Smalltalk@lists.openskills.org</a><br>
<a href="http://lists.openskills.org/cgi-bin/mailman/listinfo/ansi-smalltalk" target="_blank">http://lists.openskills.org/cgi-bin/mailman/listinfo/ansi-smalltalk</a><br>
<br></div></blockquote></div><br>
<br>_______________________________________________<br>
ANSI-Smalltalk mailing list<br>
<a href="mailto:ANSI-Smalltalk@lists.openskills.org" target="_blank">ANSI-Smalltalk@lists.openskills.org</a><br>
<a href="http://lists.openskills.org/cgi-bin/mailman/listinfo/ansi-smalltalk" target="_blank">http://lists.openskills.org/cgi-bin/mailman/listinfo/ansi-smalltalk</a><br>
<br></blockquote></div></div></div><br>
<br>_______________________________________________<br>
ANSI-Smalltalk mailing list<br>
<a href="mailto:ANSI-Smalltalk@lists.openskills.org" target="_blank">ANSI-Smalltalk@lists.openskills.org</a><br>
<a href="http://lists.openskills.org/cgi-bin/mailman/listinfo/ansi-smalltalk" target="_blank">http://lists.openskills.org/cgi-bin/mailman/listinfo/ansi-smalltalk</a><br>
<br></blockquote></div><br>
</div></div><br>_______________________________________________<br>
ANSI-Smalltalk mailing list<br>
<a href="mailto:ANSI-Smalltalk@lists.openskills.org" target="_blank">ANSI-Smalltalk@lists.openskills.org</a><br>
<a href="http://lists.openskills.org/cgi-bin/mailman/listinfo/ansi-smalltalk" target="_blank">http://lists.openskills.org/cgi-bin/mailman/listinfo/ansi-smalltalk</a><br>
<br></blockquote></div></div></div><br>
<br>_______________________________________________<br>
ANSI-Smalltalk mailing list<br>
<a href="mailto:ANSI-Smalltalk@lists.openskills.org">ANSI-Smalltalk@lists.openskills.org</a><br>
<a href="http://lists.openskills.org/cgi-bin/mailman/listinfo/ansi-smalltalk" target="_blank">http://lists.openskills.org/cgi-bin/mailman/listinfo/ansi-smalltalk</a><br>
<br></blockquote></div><br>