Why Ruby Matters ?

March 22, 2007

Last week Alexis was wondering about Haskell becoming the future of Rubyists. Reginald Braithwaite, one of the ex-JProbe suite leader, re-read Why Functional Programming matters ? from John Hugues. Although this paper is 23 years old, it is still up-to-date, and the functional paradigms it describes are still applicable. Reginald found out that there were insights that apply to programming language in general :

In a very real sense, the design of a programming language is a strong expression of the opinions of the designer about good programs. When I first read WhyFP, I thought the author was expressing an opinion about the design of good programming languages. Whereas on the second reading, I realized he was expressing an opinion about the design of good programs.

Then Reginald defines what makes a language better or more powerful.

Any feature (or removal of an [harmful] feature) which makes the programs written in the language better makes the language better.

Making an analogy with Mathematics, Reginald compares factoring with the the act of dividing a program into smaller part. The process of breaking a program into distinct features overlapping as little as possible in functionalities is called Separate of Concern (SoC). Programs that separate their concern are well factored. From this fact, Reginald defines the power of programming language :

One thing that makes a programming language “more powerful” in my opinion is the provision of more ways to factor programs. Or if you prefer, more axes of composition. The more different ways you can compose programs out of subprograms, the more powerful a language is.

Structured programming is a way to promote this.

Reginald illustrates his talk with Ruby examples where you can clearly distinguish the separation of concern between the how and the what.

In the end even if Ruby cannot be called a pure functional language, Reginald showed us notably Why… Ruby Matters.

One comment

  1. Thanks, always good posts on your blog!

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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

%d bloggers like this: