From: "David A. Black" Date: 2005-10-21T20:22:29+09:00 Subject: Re: A comparison by example of keyword argument styles Hi -- On Fri, 21 Oct 2005, Daniel Berger wrote: > Brian Mitchell wrote: >> Hello fellow rubyists, > > > >> Sydney's argument scheme (s_ henceforth) is simple when you want to >> reorder the arguments. >> >> def s_f1(a,b,c) ... end >> s_f1(b:2, a:1, c:3) >> >> Matz's scheme (m_ from now on) allows this too: >> >> def m_f1(a:,b:,c:) ... end >> m_f1(b:2, a:1, c:3) >> >> Ok. Not much difference right away no clear winner. > > Ruby has always favored implicitness over explicitness. The fact that > I don't have to do anything explicitly in Sydney makes it the winner > IMHO. I don't agree. If I write this: def meth(a,b,c) ... end I expect to be "allowed" to rename my parameters at will without breaking any calling code. I'd even expect to be allowed to change, say, (a,b,*c) to *args if I felt there was a good reason to. I don't want my choice of local variable names to be coupled to calling code. If I offer keywords or hash keys, that means I've decided that I *do* want to publish those names, and commit to them. Otherwise I consider them strictly the method's business, not the caller's. David -- David A. Black dblack@wobblini.net