Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
Instance and class variable assignment
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Austin Ziegler, post: 4488114"] 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 { =09Person() : name(""), age(-1) =09{ =09 // The rest of Person's default constructor here. =09} } -austin [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
Instance and class variable assignment
Top