Ruby is strange

Today I learned Ruby. It’s a fairly simple OO language, but it has the kludgy feel of a language designed in a hurry. In particular, the design of closures appears to be half-assed. To summarize that link, there are 7 ways to implement something like a closure, but the semantics deviate in strange ways. There are other idiosyncrasies. For example, modules are used both to create namespaces and define mixins. Another is that two mixins that use the same instance names will collide when included in the same class. You can use mixins to fake multiple inheritance, but in the simple diamond problem, I couldn’t find a way to override the lookup behavior without resorting to reflection. All in all, I just don’t see what all the hype is about.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s