The philosophy of ruby (a conversation with yukihiro matsumoto)

The Philosophy of Ruby
A Conversation with Yukihiro Matsumoto, Part I by Bill Venners
September 29, 2003

Summary

Yukihiro Matsumoto, the creator of the Ruby programming language, talks with Bill Venners about Ruby’s design philosophy, including design imperfection, the danger of orthogonality, and the importance of the human in computer endeavors.
Yukihiro Matsumoto, or “Matz,” as he is known online, is the creator of the Ruby programming language. Ruby is an object-oriented language suitable for writing day to day scripts as well as full-scale applications. Matz began work on Ruby back in 1993, because he wanted a language that made him productive while being fun to use. Initially popular in Japan, Ruby has been finding its way into the hearts of programmers all over the world.

On September 24, 2003, Bill Venners met with Yukihiro Matsumoto at the JAOO conference in Aarhus, Denmark. In this interview, which will be published in multiple installments on Artima. com, Yukihiro Matsumoto discusses Ruby’s design philosopy, the features of the Ruby language, and becoming a better programmer. In this initial installment, Matz waxes philosophic about design imperfection, the danger of orthogonality, granting freedom with guidance, the principle of least surprise, and the importance of the human in computer endeavors.

No Perfect Language

Bill Venners: Dave Thomas, coauthor of Programming Ruby: A Pragmatic Programmer’s Guide, told me that you don’t think a language design should be perfect. Why not?

Yukihiro Matsumoto: Language designers want to design the perfect language. They want to be able to say, “My language is perfect. It can do everything.” But it’s just plain impossible to design a perfect language, because there are two ways to look at a language. One way is by looking at what can be done with that language. The other is by looking at how we feel using

that language – how we feel while programming.

Because of the Turing completeness theory, everything one Turing-complete language can do can theoretically be done by another Turing-complete language, but at a different cost. You can do everything in assembler, but no one wants to program in assembler anymore. From the viewpoint of what you can do, therefore, languages do differ – but the differences are limited. For example, Python and Ruby provide almost the same power to the programmer.

Instead of emphasizing the what, I want to emphasize the how part: how we feel while programming. That’s Ruby’s main difference from other language designs. I emphasize the feeling, in particular, how I feel using Ruby. I didn’t work hard to make Ruby perfect for everyone, because you feel differently from me. No language can be perfect for everyone. I tried to make Ruby perfect for me, but maybe it’s not perfect for you. The perfect language for Guido van Rossum is probably Python.

Orthogonal versus Harmonious

Bill Venners: Dave Thomas also claimed that if I ask you to add a feature that is orthogonal, you won’t do it. What you want is something that’s harmonious. What does that mean?

Yukihiro Matsumoto: I believe consistency and orthogonality are tools of design, not the primary goal in design.

Bill Venners: What does orthogonality mean in this context?

Yukihiro Matsumoto: An example of orthogonality is allowing any combination of small features or syntax. For example, C++ supports both default parameter values for functions and overloading of function names based on parameters.


1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)



The philosophy of ruby (a conversation with yukihiro matsumoto)