From: Nikolai Weibull Date: 2005-07-20T03:04:05+09:00 Subject: Re: [RCR] nil for unassigned keys Yukihiro Matsumoto wrote: > Simon Strandgaard writes: > > Maybe I don't understand the mandatory argument thing? > > But can't you just count them somehow? > Hmm, the current rule is that all arguments are packed in an array, > and you can specify a hash without braces at the end of the argument > list, so that > > test(1, 2, 42) # [1,2,42] > test(1, 2, 3, 4) # [1,2,3,4] > test(1, 2, 3, 4=>5) # [1,2,3,{4=>5}] > > are passed by the caller. This does not require any callee side > argument tweaking. I think I can understand the rule you want, but > it's rather complex, especially in combination with optional arguments > and rest argument. Tangentially related: I thought Ruby 2.0 would be adding "true" keyword arguments to parameter lists, i.e., not storing in them in a hash. If so, how will this affect this discussion?, nikolai -- Nikolai Weibull: now available free of charge at http://bitwi.se/! Born in Chicago, IL USA; currently residing in Gothenburg, Sweden. main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}