From: Christian Neukirchen Date: 2005-08-03T03:29:51+09:00 Subject: Re: different order of parameters... Yukihiro Matsumoto writes: > |> No. Keyword arguments like > |> > |> fun(b:20, a:10) > |> > |> is planned, but named keyword arguments will be separated from > |> positional arguments still. > | > |To what extend will these be checked? > | > |I.e., if I have a method > | > | def foo(argone: 3, argtwo: 42); end > | > |What will happen when I call > | > | foo(bleh: nil) ? > > It's not settled but I guess nothing will happen, just like we had > &allow-other-keys a la CommonLisp, just because "super" may accept > more keywords. I would like to provide some scheme to check invalid > keywords like you mentioned, but not yet have had a good idea. Good checking is IMO very important... too many dumb errors can happen because of wrong speling. I'm not sure if undefined keywords should go unpassed to super... > |(and btw, can one write foo bleh: nil?) > > I'm not suer how "foo bleh: nil?" means. If it means to check whether > a keyword is given by the caller, you can accept a keyword hash by > > foo(**keys) > > then check if there's "bleh" in it. I rather meant if you can drop the parentheses... Smalltalk ahead :) > matz. -- Christian Neukirchen http://chneukirchen.org