Tuesday, April 8, 2008

The Law of the Excluded Middle does not apply to Programming Languages

While reading Herb Sutter's Blog I found a link in the comments to yet another rant about C++ and why this particular programmer does not use it any more. When are programmers going to wake up and stop this meaningless commentary about the merits of Programming Language A versus Programming Language B. When it comes to programming languages the Law of the Excluded Middle does not apply. The statements "C++ sucks" and "C++ is insanely great" are equally true. In fact you can say the same about Java, Perl, C#, etc.

It is not just that these statements can be true for one programmer and false for another. They can both be true to the same programmer on the same exact day. In fact, at this very moment I am compiling some C++ code and am of the opinion that C++ sucks and C++ is great. I think most programmers know what I am talking about. When a language does what you want or allows you to squeeze an extra uSec out of some code that needs said uSec squeezed it feels insanely great to have the privilege of working in that language. When a language gives you a completely cryptic page full of compiler errors before you squeeze out that uSec it really sucks.

This is really all that needs to be said to end all future language wars but like normal war, it will never stop. The average person just can't bare contradiction and this inevitably leads to conflict.

Do I contradict myself? Very well, then I contradict myself, I am large, I contain multitudes.

-- Walt Whitman.

3 comments:

Raju. M said...

Thankx
Raju.M

Kalani said...

That's funny, I recently used that Whitman quote as the punchline in a totally different context.

I agree that there are a lot of different dimensions along which to measure a programming language. In my opinion, programming language theory is one of the most interesting subjects to study, so I'm biased toward the view that measuring a programming language requires a sophisticated understanding of the "deep logical structure" of programming languages generally.

There's a pretty famous (though not especially deep) theorem sometimes called the "full employment for compiler writer" theorem, which shows that there's no "best" optimizing compiler. So there will always be special-purpose compilers (and therefore languages) that best fit particular kinds of problems.

Not a new idea maybe, but important for youngins with their "one true language" bent to understand.

Sal Mangano said...

That Walt Whitman quote is one of my all time favorites. Anyone who lives past 25 and has any depth whatsoever is bound to contradict themselves at least a few times.

On another note... Lately I have been doing a lot of work on functional languages. It is making me wonder what the software development landscape would have been like today if the majority of development to the Lisp fork rather than the Fortan/Algol fork. What do you think?