On 10/18/05, Daniel Schierbeck <daniel.schierbeck / gmail.com> wrote: > Austin Ziegler wrote: >>> Selon Daniel Schierbeck <daniel.schierbeck / gmail.com>: >>>> Can someone explain to me why this shouldn't be implemented in Ruby: >>>> def foo(@a, @b = "foo", @@c = "bar") >>>> # do something >>>> end >> Yes. Matz doesn't like it. ;) (And I agree with Christophe -- my >> eyes! ;) > Bollocks :( It's a bit of an oversimplification to simply say that Matz doesn't like, but I do understand why. It isn't exactly intuitive to set instance variables in a method signature. (I'm not invoking POLS here, I'm suggesting instead that it would be unnecessarily confusing.) That said, it might be nice to have a language construct like C++'s initialization list: class Person { Person() : name(""), age(-1) { // The rest of Person's default constructor here. } } -austin -- Austin Ziegler * halostatue / gmail.com * Alternate: austin / halostatue.ca