Your Ignorance Does Not Make a Programming Language Suck

(It might look like I’m picking on a couple strangers here, because they were the main inspiration for this post. I hold no grudge against them, heck, I don’t even know them. Don’t think that a few words or a few opinions encapsulates a person’s whole personality or intelligence.)

I’m trying to push for more Python adoption at the company I work at. This led me to casually google for “Python sucks” in order to anticipate any criticisms from coworkers. I found the usual suspects (mostly myths about Python’s indentation). But a couple blog posts did stand out.

The first guy wrote a post stating that Python sucks compared to Perl, because Perl has perldoc. The obvious was stated, but if you read the comments (I wouldn’t) what follows are some more lame arguments and their rebuttals. The second post was simply titled Python sucks! by Mike Warot. Warot wanted a function that is impossible in Python because strings are an immutable type. I posted a comment showing a simple solution. (His next post was entitled Python rocks!, which gave me a I-did-something-good boy scout grin.)

Of course, however serious or not these posts are meant to be taken, it’s a disturbing sentiment that I see over and over. Python’s indentation sucks. Perl is unreadable. Java is for blub programmers. Batch file writing is the assembly programming of scripting. PHP is a horrific kludge that ignored all programming language design principles but we’re stuck with it because of the masses that use it and should never be taught. (Okay, so PHP does suck.)

This is not a “the best language is the one the programmer can best use” post. And while some languages may not suck, they might suck more than they should. Here are the ways a language can suck:

  • The language’s syntax sucks. It’s hard to read, hard to maintain, or too easy to make simple syntax errors that won’t be caught at compile-time.
  • The language’s documentation sucks. There is no wiki. The tutorials on the web are scattered or poorly written. There’s a lot of beginner tutorials, but not much for advanced programmers. There aren’t enough books with animals or young, hip, attractive people I may want to sleep with on the cover about this language.
  • The language’s libraries suck. It’s version of CPAN isn’t as good as Perl’s CPAN.
  • The language’s tools suck. There are no good AND free IDEs. There aren’t any good frameworks. There are too many frameworks. Screw it, I’ll just use vi or notepad.
  • The language’s learning curve sucks. It takes a long time to learn and the documentation sucks already, so it will never see popular adoption and will continue to suck.
  • The language’s community sucks. It doesn’t have enough people. It has too many noobs. It has too many elitists. Yes, I already did RTFM…

These are all valid ways of judging a programming language, more or less. Now let’s look at the invalid but more frequent ways to judge a programming language:

  • The language’s feature set doesn’t include X, therefore it sucks. X is usually closures or static typing.
  • The language’s feature set includes X, therefore it sucks. X is usually garbage collection or static typing.
  • The language’s fitness for particular task X sucks, therefore it sucks.
  • The language does not do X like this other language does X, therefore it sucks.
  • The language’s “Hello world!” program is more than one line long, therefore it sucks.
  • I have been programming in this language for X days and I think it sucks, therefore it sucks.

This debate is tricky. It is not simply a matter of taste, or some Seussian buttered-toast opinion. There are many programming languages that do suck, or maybe they at least suck compared to modern languages. On the other hand, it is too easy to use the wrong metric to judge the language by. A programming language’s quality is not a one-dimensional quantity. And on the mutant third hand, the only way to really be able to judge a programming language is to learn its syntax, learn its idioms, learn its libraries, and use it in a couple small projects. Unfortunately its far shorter and easier to sum up the worth of a programming language in two words instead. That sucks.

The solution is plain old critical thinking. We not only have to have opinions, but know why we have them, and know why our reasons are valid. Reading software blogs may put you in the top 20% of programmers, but it doesn’t replace substantial experience. (Nor does, as I point out to myself, writing software blogs.)

“There are only two kinds of languages: the ones people complain about and the ones nobody uses.”
Bjarne Stroustrup

“A witty saying proves nothing.”
Voltaire

P.S. Have you ever noticed how saying a word over and over again makes it stop sounding like a word?

(Update in response to comments here and on Reddit) Woo! #1 on today’s programming.reddit.com! I haz 15-minutes interwebs fame! I will say a kind word about PHP (though it is a short word). PHP is simple to set up for web apps and easy to learn. Nearly all web hosts support it and there are many easy to install applications (like, for example, WordPress). But it has a lot of quirks and inconsistencies (too long to go into here) that it doesn’t need to have. These weren’t design trade-offs, they were just the result of poor planning. Hence the need for programming language theory.

Leave a Reply

free blog themes