nil, true, false in literal arrays

John Pfersich johnp at key-biz.com
Thu Feb 19 23:08:40 UTC 2004


Lex Spoon wrote:
>"Richard A. O'Keefe" <ok at cs.otago.ac.nz> wrote:
>>  Rather surprisingly,
>>      #((1 2) (3 4))
>>  is not even legal syntax in ANSI Smalltalk...
>
>
>Ack, I wonder why they did it that way?  You can still do this of
>course, if I read it correctly:
>
>     #( #(1 2) #(3 4))
>
>
>The only reason I can see for the ANSI spec is to allow this kind of
>usage:
>
>	#( (1 + 2)  (3 + 4))     "generates #(3 7) "
>
>But this is bogus IMHO.  # should be for literals, just like the QUOTE
>that it mirrors from Lisp.  Once you are in a quoted form, you should
>not have to keep quoting and quoting some more.
>
>-Lex

And it's especially wrong when you consider this from the blue book:

An array of two arrays and two numbers is described by the expression
	#(('one' 1)('not' 'negative') 0 -1)



More information about the Squeak-dev mailing list