I have a probably well-deserved reputation for being conservative about changes to Ruby. I’ve even been accused of wanting to kill Ruby (or thinking it should be dead, or some other subtle variant of the charge) because I’ve opposed this or that idea.

I am conservative about changes to Ruby—not because I think Ruby in five years should be exactly the same as Ruby today, but because I think the number of changes Ruby needs is tiny, compared with the number of suggestions that are made.

The biggest question I have about future versions of Ruby is…

Have we reached the non-line-noise saturation point?


I estimate that 95% of all changes suggested for Ruby (counting RCRs and also casual discussion on ruby-talk and elsewhere) involve adding new punctuation. Many of them make Ruby look noisy and punctuation-heavy. Taken together, they are (or would be) a full-blown concession to line noise.

Why is this? Didn’t a lot of us take to Ruby in large part because it didn’t $look(&:like) -> @@this;; ?

I’ve started wondering whether maybe Ruby has reached a saturation point, where all that can be done without excessive line noise has been done. Maybe if we want Ruby to stay clean, we simply can’t have every imaginable possible nuance of scope, namespace, symbolic reference, and and left-to-right logic forking. Maybe it’s a choice.

That’s fine with me. I’m not big on looking at Ruby as a “Swiss-army chainsaw”, the way people look at Perl. I’m happy looking at it as the kind of blender that master chefs like to use: three or four speeds, rather than fifteen or twenty. You can do anything with it, if you know what you’re doing.

I trust Matz not to turn Ruby into a bunch of uppercase numbers. (The -> lambda arrow has been dropped from the development branch, which is great news.) Assuming he doesn’t, I think it will be because he doesn’t introduce a lot of the changes being contemplated, not because they don’t use punctuation. A lot of them do. I think that may be a sign of the saturation point I’m talking about.

If I’m right, I hope we’ll just live without some of the language-level special-case handling.

6 Responses to “Why I am conservative about changes to Ruby”

  1. Danno Says:

    Maybe they could go the way of APL and support Unicode characters.

    I always thought it’d be great if a lambda could actually be prefaced with λ, because it’d be cool, y’know?

    λ do |foo,bar,bat| puts “Typing Alt+03BB isn’t so hard, is it?” end

    j/k

  2. S.Z. Says:

    I think, what is absent is the direction of Ruby evolution. What Ruby will be more? - Easy to learn? Flexible? Universal? - What we are looking for?

    Indeed. If Ruby directs its eyes to web programming, it will evolve such abilities as meta-classes, reflection, regexps. If it inclines to system administration, it will advance its portability and its syntactic ugliness (means “brevity”).

    The question is: “What we think to be choosen for Ruby?”. It is impossible to choose all that directions—such attempt will wrong, I think, it will kill Ruby.

  3. riffraff Says:

    True, I always thought of you as “Guardian of Ruby Orthodoxy”, which is a good thing, imo :)

    But still there are a lot of evolutionary changes that could be non punctuation/sigil based, i.e. multiple dispatch, rescue in blocks withouth begin, symbolic inclusion for modules, dynamic lookup for constants etc..

    BTW is matz still looking at RCRChive? it seem that some RCRs had a great response (i.e. Readable and Writable mixins) but he didn’t comment on them.

    Possibly we should force^Wsuggest to matz a cleanup of rcrchive and start an hackathon at RC2006 to implement the choosen ones :)

  4. dblack Says:

    Hi—

    I think Matz looks at RCRchive but has only accepted/rejected a few of the RCRs. I’ve occasionally nudged him to do more. I guess he’ll look at them during the 1.9 => 2.0 transition period.

    David

  5. Hal Says:

    Heh heh… as for line noise, RCR 241 (which you oppose) gets rid of two pieces of punctuation: vs. if x in y

    if y.include? x

    Not to mention the two more, the parens on ranges: vs. if x in a..b

    if (a..b).include? x

    Yes, I know, you have other reasons for hating that RCR. ;)

    Hal

  6. Ed Borasky Says:

    Amen! One of the very reasons programming languages are so successful is because they use words, which are easier to remember, as or instead of symbols! Part of that is tradition—the 026 keypunch that was used in the days of FORTRAN had upper case letters, digits and a small number of special characters.

    The original FORTRAN character set used left and right parentheses, +, -, / and * and the comma and decimal point. So everything else had to be made up from upper case letters and digits! Thankfully we have lower case letters now, and both [] and {}, and <>, etc. But code with names like “ArrivalRate” is much easier to read than a queuing theory book, where the arrival rate would traditionally be denoted by the Greek letter lambda.

Sorry, comments are closed for this article.