Yukihiro Matsumoto wrote:
> Hi,
> 
> In message "Re: A comparison by example of keyword argument styles"
>     on Fri, 21 Oct 2005 20:12:08 +0900, "Daniel Berger" <djberg96 / gmail.com> writes:
> 
> |Ruby has always favored implicitness over explicitness.  The fact that
> |I don't have to do anything explicitly in Sydney makes it the winner
> |IMHO.
> 
> Too much implicitness makes code cryptic.  Too much explicitness makes
> code verbose.  It's a matter of balance.
> 
> By the way, how do you delegate the whole arguments (including keyword
> arguments) in your style?  Using KeywordBehavior?
> 
> Besides, what would happen for the following code?
> 
>   def foo(*args)
>     # how do you delegate arguments?
>     bar(*args)
>   end
> 
>   def bar(a,b,c)
>     p [a,b,c]
>   end
> 
>   foo(1,a:2,c:3)
 >
> and
> 
>   class Foo
>     def foo(a,b,c)
>       p [a,b,c]
>     end
>   end
>   class Bar<Foo
>     # what if argument names differ?
>     def foo(d,e,f)
>       super
>     end
>   end
>   Bar.new.foo(d:1,e:2,f:3)

These may not be the best arguments. Two scenarios are possible:

1) foo is supposed to be a transparent proxy: the caller must take care
    to call it correctly, like the proxied object/method expects.

2) foo is supposed to present a real interface: the programmer must
    take care that the arguments it receives are properly mapped to bar.

In both cases, an error should be raised if keyword arguments are
passed in with nonexistent keywords.

> 							matz.

E