Because I’m rather an enthusiastic of a person, I use to ramble on many things, ideas and any stuff in general I’m happy to fiddle with.

So I talk a lot about gadgets – mostly of those I wish I had – and ideas, methodologies, technology and programming languages. And so I talk, rant, and sometimes even hype (sorry!) about Ruby.

My point in writing this disclaimer, sort of, is that I’m not a Ruby enthusiast. Ok, that’s a lie actually, but I said that for the sake of discussion. Right, make that monologue instead.

My whole point about ranting about computing stuff is an attempt, futile perhaps, to open the eyes of some people working in the software industry. By “some people” I mean folks similar to that bloke on the other side of the corridor who always thinks that Java is teh best language eva for all kinds of programming tasks. Yeah, all kinds, really. And no, I don’t mean Java is bad (even though it lacks mixins, a clever solution to the Diamond Inheritance Problem without breaking Single Inheritance, it doesn’t have closures, no first-class methods, is noun-driven, way too verbose and on the top of it all, isn’t that pure OO language after all because not everything is an object). It was the first commercially successful replacement for that monstrous, inconsistent pile of hacks on top of symbolic assembly language, better known as C++. Besides, both Java and C++ were designed by people far more intelligent than I am, and they solved, at least partially, many of the problems back then. It’s not easy to design a language, and both C++ and Java were, though likely bashed by all generations to follow, probably necessary and important, intermediate steps for the languages to come (C#, maybe?).

But that guy on the other side of the corridor could as well be raving about C#. Or Ruby, if it becomes the next leading enterprise-level solution platform (which I really doubt, because the amount of dynamicity (dynamite?) makes Ruby unsuitable for fancy-schmancy IDEs which allow you to move lumps of code here and there and claim “look, ma! I’m refactoring!”). My point is that it should be obvious that different tasks call for different tools. This is emphasized in companies that take on very diverse assignments, ranging from industrial controller and measurement tools to financial analysis software, to public network-based services. It might be relevant in specialized software companies as well, though. For example, COBOL, Java and maybe C# are the de facto choices for most financial companies, yet some of them choose rather to use Haskell or OCaml instead.

Marketing and policy-related issues aside, programmers themselves want to stick to their favourite, all-powerful language, hence referred to as Globb (though arbitrary, I guess it’s imperative, object-oriented and uses explicit static typing), usually coming up with one of the following (bad) reasons:

  • They have never thought of doing something differently, mostly because they don’t know different ways exist. A person given the task of creating a parser for some language might consider the task inherently very difficult, if the only languages he has worked with are statically typed and imperative. Two words: pattern matching.
  • Lack of understanding due to ignorance. I’m quite sure most Globb programmers don’t much care about such things as continuations, coroutines, anonymous functions, higher-order functions, introspection or dynamic typing. They would regard most of those useless, because they don’t understand how to use them properly. Maybe they tried to use them but the result was a disaster, and as such they labeled the whole technique evil, I Dunno. This is the problem with programming and mathematics: non-mathematically inclined programmers say that maths is mostly useless when talking about programming, and that’s just because they think math is only about formulas and proofs that nobody can understand anyways.
  • Laziness. And I mean the wrong kind, there’s also the good kind which makes you to automate things and keep things more DRY. But that’s a different story. These people don’t want to learn new things, maybe because they don’t really like their profession that much. Or maybe they are afraid of investing an effort to learn something new that could be used only in that particular project.
  • ...Or something else that I can’t think of or neglected to mention. Sorry, I’m in a lazy (the wrong kind) mood.

Then there’s the marketing and the problem of proving the customers that The Globb Is Not The Ultimate Solution For All Problems Ever, but the whole issue would be far less of a problem if developers themselves realized what’s wrong with the one-tool-for-all attitude.

So, I just babble and hype about Ruby language because it’s clearly the best language I’ve ever worked with. 12 years ago that language was Perl, as the only other languages I new to practically exist were C, C++, Pascal, Basic and Scheme, the last of which was just too obscure to me back then. Note the emphasis on language; the current interpreters (practically the MRI and JRuby versions) do leave stuff to be desired. And yes, the language itself could be improved as well, as always, but most of my concerns now are with the implementations, not the language itself. Then again, I think typing inference with optional explicit typing would be a great addition to the language, both for the documentation as well as helping editors to better understand structure of the program. It might also help in making the interpreter more efficient, but for me, that has never been a problem so far. As such I was quite thrilled to read about statically typed Ruby.

By “best language” I mean that Ruby is succinct enough and allows me to focus more on the problem to be solved and less on the implementation. And it is also one of the most “programmable programming languages”, maybe second to none but LISP and it’s dialects, but I really can’t say much more of that as my FP experience is yet rather limited (mostly I’ve fiddled with E-Lisp to add simple enhancements to Emacs, and some basic exercises in Haskell and Erlang).

So, I’m quite likely to regard some other language as my favorite seven years from now on, and it’s probably a language that doesn’t exist yet, but an improved version of current languages allowing even cleaner hybrid use of OO and functional programming. Or maybe it is some refined version of “Erlang”http://www.erlang.org. But I’ll try to learn many different languages with very different programming models, allowing me to improve my thinking using current tools and see familiar things in a new light. That’s basically why Pragmatic Programmers tell you to learn new (programming) language every year.

Now, off you go and read the thesis about Erlang. Or if you are already an FP buff, read the Poignant Guide instead.

Update: Sorry for the original post, it was complete crap. I know I should reread the stuff I have written at least once. And I’m not even drunk when I write like That Famous Ex-Amazon Now Google Guy, so I don’t really have excuses. Ok, I’m often tired and in great need of sleep, but that has become status quo nowadays. Sigh

Update 2: Kathy Sierra has an alternative view on the subject which I really recommend you to read. So, even though I recommend a developer should know many languages, I think she really should master a language or two to be a real professional. And that language should be general enough and well supported, IMO.

Leave a Reply