----- Original Message ----- 
From: "Paul Brannan" <pbrannan / atdesk.com>
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
Sent: Tuesday, July 30, 2002 10:56 AM
Subject: Re: Ruby Language Q's


> On Wed, Jul 31, 2002 at 12:43:02AM +0900, Dave Thomas wrote:
> > I don't think so. The change I was discussing was that
> > 
> >    pierre(a, :b => 1, :c => 2)
> > 
> > could instead be written
> > 
> >    pierre a b: 1 c: 2
> > 
> > so that the b: and c: would be picked up and converted to a hash as
> > now. I _think_ it's parsable, and it doesn't change the internals at
> > all.
> 
> I see little advantage to doing this, since the function still has to
> take its parameters out of the hash.

Two comments:

1. I think the commas are a separate issue. 
Personally I'd write it:   pierre a, b: 1, c: 2
(with or without parens).

2. Paul makes an excellent point. What I'd propose,
then, is this:
a. Keep the notation as I showed it above.
b. Don't make it just syntax sugar for a hash;
make the interpreter smart enough to handle this
notation (in which case legacy methods will be able
to automagically handle named parameters).

Example:

def mymethod(shape, width, height)
  #... no special code in here
end

mymethod "rectangle", height: 200, width: 400


Just my thoughts.

Hal