Re:Understanding the Ruby object model
by asdfaoeu on Tuesday August 09, 2011 @05:47AM
(#2863470)
Sounds like a database admin learning ruby. No idea why anyone wants to think of classes as anything more than fancy structs with allocation.
[ Parent
| on HN ]
Re:Understanding the Ruby object model
by rohitarondekar on Tuesday August 09, 2011 @06:45AM
(#2863542)
It's this kind of thinking that leads to "Ruby is all magic!". You have to understand the object model to get maximum benefit from Ruby. To be fair you need to understand the object model of any OO language to get a deeper understanding of the language.
Re:Understanding the Ruby object model
by skilldrick on Tuesday August 09, 2011 @05:57AM
(#2863478)
It's essential to know this stuff to really understand how Ruby works. If you want to know which method is going to get called then you need to grok the object model. Classes in Ruby are much more than "fancy structs with allocation", and thinking of them in that way means you'll be losing out on a lot of Ruby's power.
Yet Ruby object model don't work the same way as you would suspect - at least in compare to many other languages. You might get surprised. To see what I mean: http://scotland-on-rails.s3.amazonaws.com/2A04_DaveThomas-SO...