Monday, May 22, 2006

Ruby vs. Python vs. Lisp vs. Smalltalk vs ... X

I have been reading a lot of articles comparing languages on reddit lately. They talk about Ruby, Python, Smalltalk, Lisp (and all its dialects, and all their comparisons), C#, C/C++, Java, et cetera. What strikes me most about these articles is that they are basically doing binary comparisons between two languages in an attempt to setup some kind of hierarchy. I don't think there is, or should be, a hierarchy for languages. I propose a new model, one consisting of two sets of languages. The sets have different entries for different people. The two groups are:

- The languages you use at work
- The languages you use at home

Most everyone can identify with both of these two groups. Obviously, different languages are going to show up in different groups depending on the person. Paul Graham can say that he uses Lisp (Arc?) for both home and work. I can say that I use C# for work and Ruby for home. In fact, my groups look like:

Home = (Ruby (learning), C#, Python (learning), Scheme, SQL)
Work = (C#, SQL)

From those lists it seems clear that my home languages are a superset of my work languages. It can be argued that programmers when working for themselves are likely to choose the most powerful language they can wield, because they aren't afraid they are going to have to replace the programmer, and one who knows the powerful language might be hard to find, or very expensive. Home programmers don't have to make this tradeoff, they are the programmer. [Technical note: I define the power of a language to be the minimization of characters that are requied to perform a specific task. A future article will explore this metric using C# and Ruby to complete the same simple task.]

Languages fall into two groups, those that are safe for large companies to use for large projects (work group aka Java, C#) and those that are more powerful but also have more risk if improperly used (home group aka Python, Ruby, Lisp, Perl, etc.). Obviously, there are people using Java and C# at home, and there are (very lucky!) people using Ruby, Python and Lisp at work. This doesn't negate my assertion that most people don't code at home in the language they use at work.

Because of the existence of these two groups, I think it isn't worthwhile to argue endlessly about whether Python or Ruby is better at some specific syntax or task. I think it would be more worthwhile to use the advantage gained from more powerful and flexibile languages (whichever you favorite might be) to produce software that is cleaner, shorter (in terms of code), easier to maintain, and more powerful. We shouldn't let the risk avoidance of businesses get in the way of our producing excellent software from more powerful constructs.

Take a chance. Fail. Then do it again. Don't spend your time arguing about what way is least likely to fail (because you are using the most productive language/framework/methodology). Nike got it right, Just do it.

0 Comments:

Post a Comment

<< Home