delicious

Ruby’s Principle of Too Much Power

A murb'ed feed, posted about one month ago filed in , , , , , , & .

Interesting blog post (of over 6 years old). Which is kind of a rant against ruby-culture and the smartness of many ruby gems.

Why can the XML parser embed YAML?

YAML can instantiate objects… it’s a train wreck.

But we will agree the whole Rubyist lets-bang-gems-you-couldn’t-write-together mindset has to go. Programmers should know what the libraries they use do. And those libraries should do what you expect them to do and nothing more. There’s a whole principle of least surprise in library functionality.

Sure npm didn’t exist back then, but I agree, the principle of least surprise is an important principle. I agree and don’t even want to understand why XML parsing is part of the YAML specification (or the YAML solution for ruby). But in general, I think that ruby-developers tend to really stick to the principle of least surprise, sometimes by going extra miles (and extra CPU cycles) to make sure the gems work like they are supposed and expected to run. Whether ignoring CPU cycles is a good thing is another discussion though ;)

Go to the original link.