On 2008.02.29 08:15, Yukihiro Matsumoto wrote:
> That is very important design decision.  Objective-C-ish calling or
> Ruby-ish calling.  The latter makes program consistent, but the former
> makes program obvious. Hmm.

Actually, this would be a really great time to talk about trying to unify
the keyword argument syntax across implementations so that we do not have
to have that discussion later or contend with several variants. I know that
we are not at the 2.0 threshold yet, but obviously folks are starting to
get there.

In the particular case of MacRuby, I would go for implicitness unless
there is a reason that the programmer needs to know the difference. If
we can define an official syntax (and semantics) for keyword arguments
that also helps MacRuby, I think that would be the optimal solution.

I would probably prefer one of the Smalltalkish variants as the standard:

  duck foo: 1, bar: 2

This plausibly conforms to current method semantics:

  def duck(**kwargs)              # Implicit in the vcall
    sym, arg = kwargs.shift
    __send__ sym, arg, **kwargs
  end


--
Eero