Hacker News new | ask | show | jobs
by mieko 3973 days ago
I think, day-to-day, the Ruby object model can be as simple or as complex as you'd like it to be. Most dynamic or static OO languages have just as much complexity under the hood (vtables, doesNotUnderstand, metaclasses, etc). It has to be complete anyway, so it's made accessible, for better or worse.

I think you're more likely to run into it in the wild in Ruby because it's better exposed than most languages. When you see reflection or meta-object APIs in a lot of (typically not-as-dynamic) languages, it's sort of a "HOLY FUCK, WATCH OUT, I'M METAPROGRAMMING" flag. In Ruby, it's easier to daintily follow the white rabbit into the object model and care about the relationships you're referring to.

But on its surface level (class keyword vs. Class.new, def vs. define_method), I don't see it being any more complicated than similar dynamic languages.

When you say "puts 1+1" in a blank file, I can't imagine that not grasping that you're in a binding of an anonymous singleton instance of an Object named "main" being an hindrance. What's cool is, if you need to know, there's not a weird brick wall in your way.