Message from discussion
FINALLY: Another language adopts Smalltalk's keyword -syntax
Path: g2news1.google.com!news2.google.com!postnews.google.com!l32g2000hse.googlegroups.com!not-for-mail
From: Paolo Bonzini <bonz...@gnu.org>
Newsgroups: comp.lang.smalltalk, comp.object
Subject: Re: FINALLY: Another language adopts Smalltalk's keyword -syntax
Date: Tue, 18 Dec 2007 12:28:58 -0800 (PST)
Organization: http://groups.google.com
Lines: 30
Message-ID: <479f222a-5b58-4a94-9412-f4309447c67b@l32g2000hse.googlegroups.com>
References: <OPadnQM-BYw6aPnanZ2dnUVZ_veinZ2d@totallyobjects.com>
<fk2t4q$2mc$1@aioe.org> <2vOdnTFQ-q3qlfjanZ2dnUVZ_veinZ2d@totallyobjects.com>
<20071216124215.677ff993@g64.xss.de> <daniel_t-CFEA2A.13424616122007@earthlink.vsrv-sjc.supernews.net>
<20071217071558.2f6ebfcb@g64.xss.de> <daniel_t-439404.10541217122007@earthlink.vsrv-sjc.supernews.net>
<fk6k58$nul$1@aioe.org> <fk6lb6$sc4$1@aioe.org> <fk82ud$m40$1@aioe.org>
<c9da8653-cbb6-4b54-a501-8f2b48212b99@q3g2000hsg.googlegroups.com>
<fk8kh2$aev$1@aioe.org> <4db704bf-fbef-4150-bd58-42e3a5437185@x69g2000hsx.googlegroups.com>
<fk8v7b$cai$1@aioe.org>
NNTP-Posting-Host: 213.140.22.65
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1198009739 10408 127.0.0.1 (18 Dec 2007 20:28:59 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 18 Dec 2007 20:28:59 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: l32g2000hse.googlegroups.com; posting-host=213.140.22.65;
posting-account=HT2IuQkAAAB9Tplp5lcgRuDv7YnPQKcw
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US;
rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11,gzip(gfe),gzip(gfe)
> > I don't see how weak typing helps or hinders the problem that you
> > cannot write both of
> >
> > s moveLeft: 5 meters at: 3 mph
> > s at: 3 mph moveLeft: 5 meters
>
> The problem comes with the change to the conflict between the required
> change to the Smalltalk dispatch mechanism, and op names.
I don't see the problem. I could modify the Smalltalk compiler to
sort the keywords lexicographically, and things would still work
(barring conflicts).
> monster moveLeft: distance at: speed
> monster at: time24Hour moveLeft: distance
>
> The existing dispatch scheme is sequential, so the following are
> differentiated :
>
> m moveLeft: 5 at: 5
> m at: midnight moveLeft: 5
Sure. Thanks for this example, it is very clear (calling methods like
that in Smalltalk would be considered very poor style, but that's okay
for the sake of exemplification).
However, this is not a problem with Smalltalk vs. Lisp keywords; it's
just the lack of multimethods.
Paolo