From: matz@... (Yukihiro Matsumoto) Date: 2003-11-19T23:10:18+09:00 Subject: Re: Again, Rite explanation needed (keyword args and new hash syntax) Hi, In message "Re: Again, Rite explanation needed (keyword args and new hash syntax)" on 03/11/19, Greg McIntyre writes: |Thanks for clearing that up! Is there some reason why you chose |double asterisks (**)? Are we running out of punctuation? :) To me it |seems a little too much like the * operator repeated. It's borrowed from Python, to show we have no prejudice for it. |Isn't there a more natural syntax? Hmm... | | def f(a, b, [arguments]) | # arguments is an Array | end | f(a, b, 1, 2, 3) | f(a, b, [1, 2, 3].arguments) # => f(a,b,1,2,3) | | def f(a, b, {keywords}) | # keywords is a Hash | end | f(a, b, x:10, y:20) | f(a, b, {:x => 10}.keywords) # => f(a,b,x:10) | |What do people think? I know * is borrowed from somewhere but it's not |very intuitive. As a university tutor, students always point at it and |say, "What's *that* do?" I am not full against the idea, but I don't think it's worth enough for incompatibility. Students are easy to remember once they're told, they are not THAT stupid (I hope). matz.