Hacker News new | ask | show | jobs
by asdfaoeu 5422 days ago
Sounds like a database admin learning ruby. No idea why anyone wants to think of classes as anything more than fancy structs with allocation.
3 comments

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.
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...