From: JZ Date: 2005-08-02T20:31:04+09:00 Subject: Re: different order of parameters... Dnia Tue, 2 Aug 2005 18:24:34 +0900, Neville Burnell napisa�(a): > Ruby 1.8 "supports" this coding style however using hashes, for example: > > def fun(params) > return "#{params[:a]} #params[:b]" > end > > Print fun(:a => 1, :b => 2) Yes, but it is still weak. E.g. compare it with Python: def fun(a, b='bb', *args, **kwargs): print a, b, args, kwargs fun(1,2,3,4) # 1 2 (3, 4) {} fun(1,2,3, x=11, y=22) # 1 2 (3,) {'y': 22, 'x': 11} fun(b=111, a=222) #222 111 () {} fun(b=111, a=222, x='blah') # 222 111 () {'x': 'blah'} fun(a='aa', c='cc') # aa bb () {'c': 'cc'} -- JZ