www.howardism.org
Babblings of an aging geek in love with the Absurd, his family, and his own hubris.... oh, and Lisp.

Your Favorite Language Sucks

I know you like it, but sorry, insert-favorite-computer-language sucks. The all do. Sure, some less than others, but most certainly yours is the worst.

Language designers are smart, but limited foresight and compromises invariably introduce a inevitable gasping wut.

I find that old man rants are seldom helpful, and I try to keep this blog positive, and as Brian Goetz’ mentioned in his talk at the 2014 ClojureConj, Stewardship: the Sobering Parts, languages are like biological organisms that emerge from the genetics of their ancestors and survive in specific ecological niches.

Fair enough.

However, I would like to extend Paul Graham’s essay on the Hundred-Year Language (published in his book, Hackers and Painters), as a sort of springboard, to tell the next generation of language designers my perspective.

Simple Syntax

I’m a polyglot programmer. I do not have the luxury of spending even a full day in a single language. Think of one of your slightly-known language, and think how to get the length of an array or list. This could be:

  • A function
  • A method

and as a person who has forgotten more computer languages than some people know,

No More Optional Code

  • If the word “do” is operation, then it should never be used.
  • If the term “return” sometimes needs to be used, then it should always be used.

Limit the Options

I hate more than one way to do it

  • Just means that I have to know all ways, including side-effects
  • Always some team mate that does it the other way

Limit the Operators

  • You have to memorize every operator, its precedence ordering, its side-effects, etc. And unlike a function, you can’t do a Google search to understand it.
  • Overloaded operators are even worse, like << in Ruby is both the “here document” and array cons, e.g. [1, 2, 3] << [4, 5, 6] returns [1, 2, 3, [4, 5, 6]]

Quote from Steve Yegge:

For the most part, Ruby took Perl’s string processing and Unix integration as-is, meaning the syntax is identical, and so right there, before anything else happens, you already have the Best of Perl. And that’s a great start, especially if you don’t take the Rest of Perl.

But then Matz took the best of list processing from Lisp, and the best of OO from Smalltalk and other languages, and the best of iterators from CLU, and pretty much the best of everything from everyone.

Date: 2014 Nov 25

Validate