From: dblack@... Date: 2007-01-19T21:38:43+09:00 Subject: Re: auto assign arguments? Hi -- On Fri, 19 Jan 2007, David Chelimsky wrote: > Wow. You guys are all coming up w/ great alternatives, but would > somebody please just answer my question? I am not asking for ways to > do what I want. I'm asking if you think the following proposed syntax > addition would be useful: > > Any parameter preceded by a @ results in an instance variable being > created and initialized with the submitted value. So: > > class MyClass > def initialize(@a) > end > end > > instance = MyClass.new(5) > #results in an instance variable @a with a value of 5 That was proposed as an RCR and rejected; see http://oldrcrs.rubypal.com/rejected.html#rcr3 David -- Q. What is THE Ruby book for Rails developers? A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black) (See what readers are saying! http://www.rubypal.com/r4rrevs.pdf) Q. Where can I get Ruby/Rails on-site training, consulting, coaching? A. Ruby Power and Light, LLC (http://www.rubypal.com)