<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
It all boils down to shorter code. You can write<br>
<br>
myArray :=&nbsp;&nbsp; Array<br>
&nbsp; with: self this<br>
&nbsp; with self that<br>
&nbsp; with: aVariable<br>
&nbsp; with: #foo.<br>
<br>
<br>
But after you want more than 4 dynamic elements, you will need&nbsp; <br>
to do something else, such as create an OrderedCollection and<br>
start adding things to it, and then perhaps convert it to Array. <br>
You might decide to define a binary alias for #add:,&nbsp; like&nbsp; #&lt;-&nbsp; <br>
to save a few keystrokes. <br>
<br>
The downside for adding extra syntax for this purpose is that<br>
it makes the standard thicker, and the language harder to learn.<br>
Harder to learn means easier to make mistakes,&nbsp; and errors.<br>
<br>
For me I don't know which one is better,&nbsp; it's a question of <br>
Obama vs. Hillary.<br>
<br>
-Panu Viljamaa<br>
<br>
<br>
<br>
<br>
<br>
Andres Valloud wrote:
<blockquote
 cite="mid:491b84df0803221344r79edb075sc1710186a8910c6d@mail.gmail.com"
 type="cite">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?<br>
  <br>
Andres.<br>
  <br>
  <div class="gmail_quote">On Tue, Mar 18, 2008 at 9:57 AM, Eliot
Miranda &lt;<a moz-do-not-send="true"
 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;">
    <div>On Mon, Mar 17, 2008 at 2:11 PM, Craig Latta &lt;<a
 moz-do-not-send="true" 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's worth there'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 '#(nil true false #foo)'<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't conflict with e.g.
VisualWorks use of #{name} for binding references.&nbsp; So I have a strong
personal preference for it, but that's just personal.<br>
    <br>
    </div>
    </div>
    <br>
    <br>
_______________________________________________<br>
ANSI-Smalltalk mailing list<br>
    <a moz-do-not-send="true"
 href="mailto:ANSI-Smalltalk@lists.openskills.org" target="_blank">ANSI-Smalltalk@lists.openskills.org</a><br>
    <a moz-do-not-send="true"
 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>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
ANSI-Smalltalk mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ANSI-Smalltalk@lists.openskills.org">ANSI-Smalltalk@lists.openskills.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openskills.org/cgi-bin/mailman/listinfo/ansi-smalltalk">http://lists.openskills.org/cgi-bin/mailman/listinfo/ansi-smalltalk</a>
  </pre>
</blockquote>
<br>
</body>
</html>