Is Ruby too clever?
Posted on December 19, 2007
Filed Under ruby | Leave a Comment
Before we go there, personally, I think that Perl is clever language. Damned clever! The magical tricks you can do in Perl’s land of plenty is unreal. As such, Perl tends to attract clever people that wrestle with this huge bunking behemoth of a language in a vain attempt to wrestle it under their total control. Many fail, c’est la vie! However, those that succeed never really let go for fear of being trampled underfoot. Just take a look at the poor fella below. That’s gotta hurt!

Up until about a few years ago I used to accept my fate and jump back into the Perl saddle only to be battered senseless until I got what I needed from it. Then, a broken man, I ran like hell, never looking back, for fear that would Perl would find me! More importantly, everything I learnt whilst in the saddle, stayed in the saddle. As is always the case with my battles with Perl, I took away very little from each encounter. Nowadays, there are alternatives to Perl, so I don’t need to seek it out any more. Why would I? It hurts! In fact, I haven’t touched Perl for nearly 12 months now and I feel whole again.
So if Perl is a clever language, used by clever (or stronger) people, then is the resulting software clever? I hope not. Why? Because clever software requires clever people to evolve/maintain it. And as you probably know, there is a distinct lack of clever people in the software industry, so why on earth would I want to go there?
I want a language that is fit for the masses. I don’t think that this is Perl. Java and C# are for the masses, whereas as Visual Basic, what can is say, it’s all Dim, Dim, Dim!
So what about Ruby? I think Ruby is a little bit too clever at the moment. There are just too many ways to do the same thing. Too many Perl-isms in the language. Too many shortcuts (SGML vs XML again). I haven’t looked but I’m sure there must be a set of standards and/or conventions for how best to the use the language. What you should/shouldn’t do? The infamous gotcha list that many C++ programming masters continually beat the not-so-clever masses across the head with. We need a best practice for using Ruby language constructs. Even when reading through the PickAxe Programming Ruby book by Dave Thomas and Co, Second Edition (a great read), it’s littered with these types of comments and caveats.
Now I ain’t no language designer, but I can just imagine the forums are packed with I(H?)MO Ruby should. It’s so much harder to take things out than put things in (unless you’re talking about a box of chocolates or a jam-packed cake tin that is
). I don’t know where Matz is with Ruby 2.0, but things are not going to change that much to simplify the language. Now I don’t want to dumb down the language, but more just remove noise. Ruby is rightly expressive to arm us with the weapons to fight damned hard problems. But we need to keep tools like Ruby sharp, clean but free from crap and distractions.
What I’m looking for is more a RubyLite that standardises of best of breed language use, code style and syntax. I think our company’s RubyLite will be comprised of a living document and/or supporting examples that developers can lookup and reference as they learn the language. These developer aids will contain gotchas, common idioms, scary features, and so on. The more the language designers can do to remove crap and distractions from the language, and there’s not too much to do here, the smaller and more manageable these supporting documents/examples will be.
What do you think?
PS: I don’t hate Perl and I love Ruby.
Comments
Leave a Reply

