Development language pros and cons

Ruby pioneers come clean on the language's shortcomings

Ruby founder Yukihiro Matsumoto and Rails creator David Heinemeier Hansson offer frank feedback on the language

ruby rails programming
Thinkstock

Development language pros and cons

Show More

Ruby, a dynamic language first released in 1995, has been praised for its simplicity and routinely shows up on lists of popular languages. It's had its critics over the years as well, and two of the most prominent members of the Ruby community are not afraid to offer criticism of the language along with praise.

Ruby inventor Yukihiro Matsumoto and David Heinemeier Hansson, founder of the popular Ruby on Rails Web development framework, offered their perspectives on Ruby in emailed responses to InfoWorld questions this week.

Ruby's strengths

Matsumoto is a man of few words in when it comes to listing his language's qualities and shortcomings. Ruby, he says, offers "concise, yet readable code." It also provides "higher abstraction, like object-oriented programming, functional(-ish) programming, metaprogramming, etc."

Performance, he says, is "fast enough for most cases," and there are lots of Internet resources for Ruby because the language has "a welcoming community all over the world." Matsumoto also cites the presence of Ruby on Rails and the RubyGems package manager among Ruby's benefits.

Hansson, meanwhile, begins with "Ruby's clear focus on programmer happiness" when listing the language's benefits. "From this focus flows a wealth of comforts and conveniences as well as beauty. Writing Ruby is simply a pleasure beyond any I've ever experienced in programming."

The language, he says, also embraces multiple paradigms: "Ruby is a distinctly postmodern language: It takes the best from all the major programming paradigms. You can go object-oriented when that's a great fit, you can [go] functional when that works. Its breadth of abilities and tasteful curation of programming principles is the best I've seen anywhere."

Ruby also balances progress and stability, Hansson says. "The Ruby world moves fast, but not so fast as to make you dizzy like what's going on in JavaScript. Yet it's not so slow as to be marred down in stagnation like Perl or failure of adoption like Python 3. It threads the needle gracefully."

Ruby's weaknesses

On the downside, Matsumoto points to a syntax that can be too complex for developers to grasp all at once. Also, Ruby is "slower than statically compiled languages like Java or Scala." And there are fewer applications and libraries for a non-Web field, such as for research computing, though the issue is being addressed via the SciRuby project.

On the subject of speed, Hansson admits "there are certain niche-types of applications and certain levels of Internet scale where Ruby isn't a good choice. That niche and that level of scale has never been smaller or further away than it is today, but it's still there. It'd be great if we never needed to drop down to a system-level language like Go or Rust or C, but occasionally we do."

Ruby's expressiveness, meanwhile, can lead to "overly clever" DSLs, says Hansson. "You can write Ruby in such a way that it almost looks like English. But almost is sometimes worse than 'clear different from,' which the lessons of AppleScript has taught us well. A few popular Ruby libraries fly too close to this sun in my opinion."

Copyright © 2015 IDG Communications, Inc.