nil, true, false in literal arrays
Lex Spoon
lex at cc.gatech.edu
Wed Feb 18 17:59:24 UTC 2004
"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
More information about the Squeak-dev
mailing list
|