From: "David A. Black" Date: 2005-10-23T04:40:57+09:00 Subject: Re: A comparison by example of keyword argument styles Hi -- On Sat, 22 Oct 2005, Daniel Schierbeck wrote: > Damphyr wrote: >> The :a syntax looks a lot like symbols ... > > Erm, the keywords *are* symbols. > > def foo(a: 1, b: 2, **keys) > puts keys[:a] # :a is a symbol! > end > > Therefore i think it's more clear if we write the keys as symbols. > > def foo(:a = 1, :b = 2, **keys) > puts keys[:a] # foo(:a) -> keys[:a] > end :a = 1 parses visually like assignment to a symbol, and therefore looks bizarre. David -- David A. Black dblack@wobblini.net