Ruby (programming Language) - Philosophy

Philosophy

Matsumoto has said that Ruby is designed for programmer productivity and fun, following the principles of good user interface design. He stresses that systems design needs to emphasize human, rather than computer, needs:

Often people, especially computer engineers, focus on the machines. They think, "By doing this, the machine will run faster. By doing this, the machine will run more effectively. By doing this, the machine will something something something." They are focusing on machines. But in fact we need to focus on humans, on how humans care about doing programming or operating the application of the machines. We are the masters. They are the slaves.

Ruby is said to follow the principle of least astonishment (POLA), meaning that the language should behave in such a way as to minimize confusion for experienced users. Matsumoto has said his primary design goal was to make a language which he himself enjoyed using, by minimizing programmer work and possible confusion. He has said that he had not applied the principle of least surprise to the design of Ruby, but nevertheless the phrase has come to be closely associated with the Ruby programming language. The phrase has itself been a source of surprise, as novice users may take it to mean that Ruby's behaviors try to closely match behaviors familiar from other languages. In a May 2005, discussion on the newsgroup comp.lang.ruby, Matsumoto attempted to distance Ruby from POLA, explaining that because any design choice will be surprising to someone, he uses a personal standard in evaluating surprise. If that personal standard remains consistent, there would be few surprises for those familiar with the standard.

Matsumoto defined it this way in an interview:

Everyone has an individual background. Someone may come from Python, someone else may come from Perl, and they may be surprised by different aspects of the language. Then they come up to me and say, 'I was surprised by this feature of the language, so Ruby violates the principle of least surprise.' Wait. Wait. The principle of least surprise is not for you only. The principle of least surprise means principle of least my surprise . And it means the principle of least surprise after you learn Ruby very well. For example, I was a C++ programmer before I started designing Ruby. I programmed in C++ exclusively for two or three years. And after two years of C++ programming, it still surprises me.

Read more about this topic:  Ruby (programming Language)

Famous quotes containing the word philosophy:

    The real discovery is the one which enables me to stop doing philosophy when I want to.—The one that gives philosophy peace, so that it is no longer tormented by questions which bring itself into question.
    Ludwig Wittgenstein (1889–1951)

    Irish? In truth I would not want to be anything else. It is a state of mind as well as an actual country. It is being at odds with other nationalities, having quite different philosophy about pleasure, about punishment, about life, and about death. At least it does not leave one pusillanimous.
    Edna O’Brien (b. c. 1932)

    I would love to meet a philosopher like Nietzsche on a train or boat and to talk with him all night. Incidentally, I don’t consider his philosophy long-lived. It is not so much persuasive as full of bravura.
    Anton Pavlovich Chekhov (1860–1904)