From: Simon Strandgaard Date: 2005-07-19T23:02:25+09:00 Subject: Re: [RCR] nil for unassigned keys On 7/19/05, Yukihiro Matsumoto wrote: > on Tue, 19 Jul 2005 21:58:53 +0900, 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. Ok, Thanks for explaining how it works. I had no idea what it would take to add this.. Just thought that I had to give it a go. -- Simon Strandgaard