If programming languages were musical instruments

I was explaining to my wife yesterday why I might not want a certain contract I was thinking about bidding on. She is not a programmer, but she is a musician, so I explained that being asked to code professionally in PHP would be like being asked to lead a piano concerto on a cheap Casio keyboard. Technically possible but probably it is the instrument you started out on, and now you have moved on to other things.

(For what it’s worth, I do work on projects in PHP as there are some cases where it makes sense or there is a legacy codebase to work with, it’s just not my favourite and does have an unfortunate but not unjustified reputation.)

Anyway, thinking about this tickled me, so if you’ve seen If Programming Languages were Religions, If programming languages were cars, If Operating Systems Ran The Airlines, and all the rest, you’ll know where I’m going when I present: If Programming Languages were Musical Instruments.

Assembly: A big pile of lumber, strings, elephant tusks, ebony and some brass ingots.

Basic: A recorder, ideal for a child to make noises but not generally useful as a professional musician and fairly ugly in its output.

C: A harpsichord. Old, baroque, suitable for a range of old-fashioned music but not recommended for beginners or new compositions.

C++: A Yamaha DX7 synthesizer from the 80s. Technically accomplished for its time, but hard to use, clunky in this day and age, and may occasionally catch fire.

Java: A Casio keyboard. Functional but dull and with incredibly limited expressivity.

C#: A Roland keyboard. Very similar to the Casio keyboard. Every feature is slightly better but in an incompatible way.

PHP: A Fisher-Price keyboard suitable for absolute beginners. The automatic accompaniment track helps you get started but you soon realise that, whilst you can make a melody, it sounds dull, is hard to play anything complex on, and is aimed more at students than professionals.

Perl: A one-man band kit. Versatile for playing any kind of music, but the overall effect is slightly naff and is looked down on by most professional musicians.

Python: A xylophone, guaranteed to sound reasonably melodic and is easy to learn, but lacking professional panache.

Ruby: A guitar, enabling both pedestrian plucking as well as virtuoso finger twiddling. Good luck finding more than a couple of them together to play in a band though.

Javascript: A cajon, a drum made in a hurry essentially out of a wooden box, yet strangely beloved of hipsters and, with some practice, capable of imitating almost all of the functionality of a real musical instrument.

Lisp: A loop pedal, enabling you to repeat parts of your music in complex ways involving no effort on your part, with the slight risk of everything turning into a god-awful feedback-filled mess.

Haskell: A violin, which, by eschewing the syntactic input of other instruments, enables virtuoso performances by the very gifted, and an incredible racket that quickly screeches to a halt for everyone else.

Typescript: A fancy cajon that comes with a freestanding cymbal. Despite expectations, this actually works quite well as a replacement for a drumkit.

Clojure: An incredibly versatile effects pedal connected to a box labeled “Interoperability: don’t look in here”, which contains a Casio keyboard and magic. It’s rumoured only Rich Hickey can actually play it.

Scala: The Wintergatan Marble Machine. Cool, European, sounds incredible, but fiddly to actual use, drops its marbles occasionally, and finding anyone else who can play it is impossible.

Hat tip to Ryan Palo for doing the same joke in much better illustrated way which I found when thinking about this.

So there you have it, a humorous guide to programming languages. If I missed off your favourite language, sorry, it's probably because I haven't used it enough to be judgemental about it!