Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion FINALLY: Another language adopts Smalltalk's keyword -syntax

Path: g2news1.google.com!news3.google.com!out03b.usenetserver.com!news.usenetserver.com!in04.usenetserver.com!news.usenetserver.com!uns-out.usenetserver.com!news.usenetserver.com!pc02.usenetserver.com!DIALUPUSA.NET!not-for-mail
Date: Wed, 26 Dec 2007 07:37:35 -0500
From: Doug Hoffman <no.spam>
Reply-To: dhoffman.at.talkamerica.dot.net
User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728)
MIME-Version: 1.0
Newsgroups: comp.lang.smalltalk
Subject: Re: FINALLY: Another language adopts Smalltalk's  keyword -syntax
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>
In-Reply-To: <daniel_t-CFEA2A.13424616122007@earthlink.vsrv-sjc.supernews.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <310be$47724a4c$cdd08547$31559@DIALUPUSA.NET>
X-Complaints-To: abuse@usenetserver.com
Organization: UseNetServer.com
Lines: 44
X-Trace: 310be47724a4c687520e231559

Daniel T. wrote:
> Stefan Schmiedl <s...@xss.de> wrote:
> 
>> One of Lisp's advantages is that the sequence of keyword arguments does
>> not matter.
> 
> You are assuming that is an advantage...
> 
> monster moveAt: 5 mph left: 3 meters.
> 
> monster moveLeft: 3 meters at: 5 mph.
> 
> It seems to me that allowing both lines above obfuscates without adding 
> anything useful.

Indeed.

In another language (PowerMops) we get along fine with something like 
the following.

3 5 moveLeft: monster

or, if visual cues are desired we can insert comments

3 ( meters)  5 ( mph) moveLeft: monster

or if unit conversion/declaration is required then we would do it as follows

3 meters  5 mph  moveLeft: monster



Actually we have no concept of "keywords" in a message send.  There can 
only be a single word message (in this case moveLeft:) with as many 
parameters as one wishes.  The number and order of parameters is fixed 
and must precede the message.  All message names must end with a 
colon(:).  The object normally immediately follows the message.  We have 
  an easy to use look-up browser to remind of parameter type and order.

Regards,

-Doug Hoffman  Longtime lurker and admirer of Smalltalk

http://sourceforge.net/projects/powermops/  (Macintosh only)