[ANSI-Smalltalk] re: array creation syntax (was: expressing
method signatures)
Eliot Miranda
eliot.miranda at gmail.com
Tue Mar 18 16:57:17 GMT 2008
On Mon, Mar 17, 2008 at 2:11 PM, Craig Latta <craig at netjam.org> wrote:
>
> > Defining new language elements is hard. The worst that could happen
> > to this project, is to have extremely long threads with no conclusion
> > as on the Squeak list.
>
> Indeed, although for what it's worth there's no lingering debate
> there on this particular issue[1]. ;)
>
>
> -C
>
> [1]
>
> Namely, the short form of...
>
> Array with: #foo with: #bar
>
> is...
>
> #(foo bar)
>
> as in Smalltalk-80, and the short form of...
>
> Array with: #foo with: true
>
> is...
>
> {#foo. true}
Well, in Squeak 3.9 I get
Welcome to the finale version of 3.9 of 7 of November 2006
#(nil true false foo) collect: [:ea| ea class] {UndefinedObject . True .
False . ByteSymbol}
#(nil true false foo) printString '#(nil true false #foo)'
But I suspect the appropriate standard use of curly brackets
> across multiple dialects is a whole other morass. :)
Having been living with Squeak for a while now I really, really like the
curly brace syntax. I also note that it doesn't conflict with e.g.
VisualWorks use of #{name} for binding references. So I have a strong
personal preference for it, but that's just personal.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openskills.org/pipermail/ansi-smalltalk/attachments/20080318/ef6c6cff/attachment.htm
More information about the ANSI-Smalltalk
mailing list