Yukihiro Matsumoto wrote:
> Hi,
> 
> In message "Re: Confusion Over Keyword Arguments"
>     on Thu, 2 Mar 2006 05:32:50 +0900, "Mr. Big" <no / no.com> writes:
> 
> |def my_meth(options={})
> |end
> |
> |(1) my_meth(:keyword => 3) # Ruby 1.8
> |(2) my_meth(keyword:3, another_option:10) # Ruby 2.0
> |
> |Won't this create confusion?
> 
> No, on the virtual implementation (only inside of my brain), they are
> same things.  The magic is in receiving and interpreting arguments.
> 
> |Why must keyword arguments use the same 
> |syntax as new hash literals?
> 
> No, we don't have to.  The colon can be ugly with symbols, for
> example,
> 
>   db.find(order: :date)
> 
> is not good looking.  Any other proposal (except for "=')?

We are running out of characters, could we instead switch to
be the very first fully Unicode language? Have the actual
lambda sign for lambdas, the sigil for symbols and so on.. :)

> |How about "=" for keyword arguments instead 
> |(such as in python)?
> 
> Unfortunately, assignments are legal in argument list in Ruby.
> 
> 							matz.


E

-- 
Posted via http://www.ruby-forum.com/.