[squeak-dev] Re: [Question] nil, true, false in array literals
Andreas Raab
andreas.raab at gmx.de
Wed Dec 3 19:20:43 UTC 2008
Igor Stasenko wrote:
> Doesn't smalltalk stands for simplicity?
Yes. But what you are proposing isn't any simpler. It is just different
"special rules" for literal arrays. If you want it "simpler" then you
would get rid of interpreting unbound names in literal arrays as symbols
and rather have them require proper #symbol syntax. In other words,
instead of
#(1 2.0 true false 'string' foo bar baz)
you would say:
#(1 2.0 true false 'string' #foo #bar #baz)
in which case you might even be able to get rid of {} since now there is
a perfectly reasonable interpretation of:
| date time |
date := Date today.
time := Time millisecondClockValue.
^#(date time)
and the current (static) literal array implementation would be an
optimization for the case of no dynamic bindings in the contents of the
literal array.
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|