Example A-SIGNATURES Re: A Way to express Standard multi-argument Method Signatures in Smalltalk Re: [ANSI-Smalltalk] Next STEPs

Eliot Miranda eliot.miranda at gmail.com
Wed Mar 12 20:58:13 GMT 2008


On Wed, Mar 12, 2008 at 1:34 PM, Paolo Bonzini <bonzini at gnu.org> wrote:

>
> >     Somewhat drifting from the original topic, but I'll note that the
> ANSI
> >     standard does not have symbols in array without a prefixed # (the
> only
> >     "bare" keywords accepted there are true/false/nil and they signify
> the
> >     three objects).
> >
> > Which is something I'd change.  Which dialects don't support the
> > non-ANSI behaviour?
>
> GNU Smalltalk.  I'm not opposed to changing it, *but* watch out because
> it's incompatible.  I would also appreciate an input on why the current
> choice was made.


In Smalltalk-80
    #(nil true false foo) = (Array with: #nil with: #true with: #false with:
#foo).
Users generally complained about nil true and false as Symbols not being
useful, so in (I think) ObjectWorks 2.3 ParcPlace changed it to
    #(nil true false foo) = (Array with: nil with: true with: false with:
#foo).

Its generally more useful that way.  I (and I suspect plenty of others) find
the extra #'s annoying noise that detracts from readablity.  The
inconsistency is livable with since it is more convenient and there are only
three exceptions.


I would oppose for sure having #(abc true) mean "Array with: #abc with:
> true".  That would be the worst of both worlds.


I hear your objection.  For me I find the above rule preferrable.  Note that
modifying GnuSmalltak to support the above syntax doesn't break existing
code because it all uses #foo except where it uses nil true and false.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openskills.org/pipermail/ansi-smalltalk/attachments/20080312/11a4b444/attachment.htm


More information about the ANSI-Smalltalk mailing list