<!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">
Eliot Miranda wrote:
<blockquote
 cite="mid:3ac5ce8a0803121358o78b49ceekc948657b48db627c@mail.gmail.com"
 type="cite">....&nbsp; in (I think) ObjectWorks 2.3 ParcPlace changed it to<br>
  <div class="gmail_quote">
  <div>&nbsp;&nbsp;&nbsp; #(nil true false foo) = (Array with: nil with: true with:
false with: #foo).<br>
  <br>
Its generally more useful that way.&nbsp; I (and I suspect plenty of others)
find the extra #'s annoying noise that detracts from readablity.&nbsp; The
inconsistency is livable with since it is more convenient and there are
only three exceptions.<br>
  </div>
  </div>
</blockquote>
<br>
Three exceptions is&nbsp; lot,&nbsp; I think.&nbsp;&nbsp;&nbsp; Consider instead this way of
creating <br>
non-literal lists,&nbsp; or&nbsp; Arrays, with&nbsp; the "Association Syntax":<br>
<font face="Courier New"><br>
<b>&nbsp;nil&nbsp; -&gt;&nbsp; true&nbsp; -&gt; false&nbsp; -&gt; #foo.</b></font><br>
<br>
This creates a tree of Associations -&nbsp; which really is a LINKED LIST! <br>
No special rules of evaluation, apart from standard ST-80&nbsp; are required.<br>
<br>
<br>
<br>
The same pattern can be applied also to create "straight" Arrays <br>
or whatever&nbsp; data-structures on the fly.&nbsp; For instance we could define <br>
the method<b>&nbsp; #&lt;-</b>&nbsp; for Object&nbsp; so that <br>
&nbsp;<br>
<font face="Courier New"><b>(nil&nbsp; &lt;-&nbsp; true&nbsp; &lt;-&nbsp; false&nbsp; &lt;-&nbsp;
#foo) &nbsp;&nbsp; =&nbsp; <br>
(OrderedCollection with: nil with: true with: false with #foo)&nbsp;&nbsp; </b>.</font><br>
<br>
The difference between the left- and right side above<br>
is that<br>
1.&nbsp; "( nil&nbsp; &lt;-&nbsp; true&nbsp; &lt;-&nbsp; false&nbsp; &lt;-&nbsp; #foo) " is shorter<br>
2.&nbsp; We can create Collections&nbsp; of arbitrary length this way: <br>
3. We can decide whether to use a variable or a literal for <br>
&nbsp;&nbsp;&nbsp;&nbsp; any part of the expression:<br>
<br>
#foo &lt;-&nbsp; foo &lt;- 123 &lt;-&nbsp; nil&nbsp; &lt;-&nbsp; "true"&nbsp; &lt;-&nbsp; #false&nbsp;
&lt;-&nbsp; #foo &lt;-&nbsp; nil&nbsp; &lt;-&nbsp; true&nbsp; &lt;-&nbsp; false&nbsp; &lt;-&nbsp; foo<br>
<br>
<br>
POINT:&nbsp; Smalltalk (-standard) does not <i>need</i> a syntax for
creating&nbsp; Arrays <br>
with non-literal elements.&nbsp; Why?&nbsp; Because BINARY OPERATORS can be <br>
utilized and redefined as needed to construct arbitrary data-structures.<br>
<br>
-Panu Viljamaa<br>
<br>
-- Utilize the Power of Smalltalk!<br>
<br>
<br>
</body>
</html>