From: Joseph McDonald Date: 2001-03-06T04:34:17+09:00 Subject: [ruby-talk:12051] Re: RCR: shortcut for instance variable initialization > I have what is probably a weird idea, but anyway, have a look: > class Msg > > def initialize(name@, type@, txt@) > > # Here, the variables would be available *without* the '@' > # e.g., "puts name" > # and the assignments "@name = name", etc., would be automatic > > end > end > > > The point would be to trigger the assignment, but without using > exactly the same name as the instance variables themselves. (I do > find (@name, @type, @txt) confusing.) Would you want it to work like this: def blah(name@, type$, txt) where @name $type and txt are created? personally I like def blah(@name,$type,txt) It seems straight forward to me, but perhaps I'm strange, or I'm missing something. -joe