If Programming Languages were <T>

With the recent popularity of the comparison between PLs and Religions (reddit, slashdot), I thought it'd be mildly amusing to see what other comparisons were out there on the intarweb.

Here's the list for the meme that I collected of If Programming Languages were ...

Probably others that I missed. (Note: There's probably material in here to offend all). (Personally, I think the obvious missing comparison is If Programming Languages Were Tools. I nominate Assembler as the Stick, being the most primitive).

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Tool related

Not exactly the same format but

When C++ is your hammer, every problem looks like your thumb

Light bulb jokes

Also not the same format

How many Haskell programmers does it take to change a light bulb?
One, but he won't actually change it until somebody else turns on the light.

How many C programmers does it take to change a lightbulb?
Three, and the bulb would have to be removed and reinserted several times before they got it to work. And no-one would be able to change the bulb after that.

How many Ada programmers does it take to change a lightbulb?
One, but before they could start, 87 bureaucrats would have to write proposals justifying the expense of changing it.

How many Lisp programmers does it take to change a lightbulb?
None. The programmer writes the basic code, then the bulb changes itself.

How many Forth programmers does it take to change a lightbulb?
The light bulb changes the programmers.

How many Pascal programmers does it take to change a lightbulb?
We buy a new lamp: it's too much trouble to change the bulb.

How many Prolog programmers does it take to change a lightbulb?
No.

How many Microsoft programmers does it take to change a lightbulb?
None. When the bulb blows, darkness becomes the de facto standard.

How man Coq programmers does it take to change a lightbulb?
Are you kidding? It takes 2 post-docs six months just to prove that the bulb and the socket are both threaded in the same direction.

hilarious

How many Prolog programmers does it take to change a lightbulb?
No.

That's simply brilliant.

Fastenings

I had quite a good one of these based on fastenings; lets see of I can remember it:

C - The nail. Watch the sharp point...ers.
Ada - The nut and bolt. Solid and time-consuming.
Python - Blu-Tack. Convenience over solidity.
Perl - duct tape. Quick and ugly.
Visual basic - Pritt stick (or whatever glue is used in elementary schools in your area)

Etc etc. Your favourite language gets the screw, unless you hate screws. The idea comes from perl's tagline as 'the duct tape of the internet', plus the fact that I started thinking of scripting languages as 'blu-tack languages' rather than 'glue languages' for some reason.

More fastenings...

Assembler - Stapler. It might take a few, but it'll work great.
Smalltalk - Magnet. Powerful if you know how to use it.
SNOBOL - String. :)
Haskell - Zipper. There's a beginning and there's an end
LISP - Rubber band. You can create anything with rubber bands.

There's got to be a spot for the plastic tie wrap, I just can't think of one. :)

Mike

Plastic wrap

Actually, that would be Haskell. What it may lack in strength, it makes up in transparency.

And I'd nominate one more:

Ruby - paper clips; with monkey patching, you can bend it into any shape you like.

I'd say that assembly must

I'd say that assembly must be the four fundamental forces. Or maybe just electromagnetism-- microcode and hardware design could be the weak and strong nuclear forces, but what would that make gravity?

Changing user requirements,

Changing user requirements, pulling the system into a ball of mud?

Mixed Drinks

I'm pretty sure the mixed drinks guy isn't qualified.

Here's a few - If _ were a mixed drink, it would be _.

C# : Mai Tai
C++ : that thing you'll get if you ask for a Mai Tai at a club
F# : Pimento Dram
Java : Bacardi and Coke
Ruby : Singapore Sling
ASP.NET : Budweiser, but would probably taste worse

Uh

Bacardi and Coke?
That must be disgusting..

Rum and cokes are pretty good, actually...

There are far finer rums than Bacardi, of course, but when you mix your booze (or coffee) with sugary things, the dynamic range between the best and the cheap stuff gets compressed--kinda like listening to Beethoven in a cheap Toyota on a bumpy road.

C++ would probably be absinthe. If you have some, you think you are all-powerful; everyone else just thinks you're really f*cked up.

Still pretty large

I like rum and Coke quite a lot, but Bacardi is disgusting and way overrated. Plenty of people love it and never realize that even the well brand goes down better. But it's highly marketed and available so most just assume it is the quality brand and never bother to verify for themselves. Kinda like Java.

Programming languages as tools

insufficiently general story title

A much more appropriate title would have been:

λx.if programming languages were x

What kind of abstraction?

Should that be a λ or a ∀?  If one considers a story's title as a sort of type annotation….

perhaps, but...

This site isn't called "Forall the Ultimate". :)

&Lambda; the Ultimate

Λ the Ultimate

Is it any coincidence

that the nerdy frathouse in Revenge of the Nerds was ΛΛΛ?

Girlfriends My Foot!

To relate a response to "And then there's Haskell..."...

And then there's Haskell.

She's the girl you keep hoping you won't run into. You met her at a singles night for Orthodox Jews when your obnoxiously religious flatmate introduced you. Sure she's thin, and she's got the "features" to please the great gods themselves, but when you tried talking to her all she did was glare at you like your type annotations were infectious. And while you did finally get her in bed... you discovered she'd only do one thing. Just one position, and that through a sheet because you haven't got an Orthodox type signature -- you're too impure for her. And she's so damn lazy, practically just lays there!

So the next day you go back to your old faithful, fun, creative, kinky girl Scheme. And you never tell her about Haskell, because you don't want to ruin your great relationship based on one night's horrible mistake. You're wracked with guilt about ever going anywhere near Haskell for weeks.

But the thing is... after that one time all the guys keep asking how you and Haskell are doing. They keep acting like you picked the most wonderful girl on Earth, and keep wondering out loud when you're going to meet Haskell under the PhD wedding canopy.

So after 3 months you get so scared of these fundamentalist weirdos that you ask Scheme if you can move into her apartment on the other side of the city while you find a new place.

...Girlfriends on your Foot?

All I'm saying there is that my column in The Monad.Reader was called Impure Thoughts for a reason :-)

That said, perhaps I should be a little more polylinguistic?

Beer

Ada: Synthahol. OK, this is venturing into the sci-fi realm, but you know what I mean.
Assembly language. Not beer, just bushels of hops and grain, barrels of sugar and yeast, and water. (And whatever other stuff you want to add).

Basic: Blitz Beer. Now-hard-to-get regional el-cheapo beer.

C: Olde English 800. Nobody likes the taste much, but that isn't the point--it's the quickest and most expedient way to get drunk.

C++: Colt .45. Gets you drunk just as quickly as OE, and has an even worse reputation among many beer snobs.

C#: Bud Light. Now the preferred industrial brew of big business; though many critics argue that its success is all about marketing and market share.

COBOL: Miller Lite. Utterly despised by aficionados, but a highly profitable mass-produced beer. Or at least it was at one time; it has been displaced by other brands.

Eiffel: Pilsner Urquell. The best known beer to come from Belgium.

Erlang: Nils Oscar God Lager. The only Swedish brew I can think of offhand.

F#: Michelob Pale Ale. Yet another corporate knock-off of a distinctive regional style. :)

Forth: Small-batch homebrew kit beer. Unlike with assembler, the ingredients and the equipment are provided, but you still have to make the beer yourself. And you should--it's the only way to enjoy beer.

FORTRAN: Still-potable, but utterly lousy-tasting, beer brewed by an ancient civilization and uncovered by archeologists.

Haskell: Guinness. Dark and impenetrable, and beloved by its fans. Scarcely recognizeable as beer by many others.

Java: O'Douls. A modern non-alcoholic malt bevarage, peddled for its alleged safety. Nobody who likes beer wants to drink it though.

Javascript: Any number of regional microbrews ordered over the Internet.

LISP: Sam Adams Boston Lager. Quintessentially American craft lager, from that city that considers itself the intellectual capital of the US, and been around for a long time. Has a loyal following, though many beer drinkers have never heard of it, or if they have,
think of it as beer for weirdos.

Logo: Root beer. Technically not beer, but you didn't think we were gonna let the kiddies have the hard stuff, did you?

ML: Trafalgar India Pale Ale. Very bitter beer which is an acquired taste, but those who like it love it.

Objective C: Pabst Blue Ribbon. A better reputation than other Pabst products, especially among the trendy set, but the purpose is still getting drunk.

O'Caml: Saison--a pale French ale.

Pascal: Near-beer, a Prohibition era non-alcohol malt beverage that survived the end of prohibition for its lack of intoxicating effects, and is generally reviled for its lack of taste.

Perl. Coors Light. Once considered the trendy alternative to Bud and Miller; now just another icky corporate brew.

PHP: Lone Star Beer. The epitome of "quick and dirty" beers.

PL/I, Algol, Modula, etc.: Various extinct brands like Falstaff, Meister Brau, and Dixie Beer that nobody misses much.

Python: Full Sail Amber Ale. Easy-drinking and full-bodied micro that still has lots of "cred" among the cognoscenti.

Ruby: Sapparo beer.

Scheme: Microbrew from some Boston streetcorner pub, for those who think that Sam Adams has too many artificial ingredients. The taste is raved about by many, though few have ever tried it.

Smalltalk: Sierra Nevada Pale Ale spiked with other mind-altering ingredients. If you speak it, you'll start babbling in syntax that others find strange, unless they've drunk the same beer. Can only be sold on tap at the premises, as the beer is not shelf-stable. Each batch is reported to use yeast derived from that used to prepare the original batch at the brewery in Palo Alto.

Visual Basic: Henry Weinhard's Private Reserve. The "big brother" to Blitz, once with a trendy cachet. Now just another corporate beer being marketed as something unique.

Plzeňer

Eiffel: Pilsner Urquell. The best known beer to come from Belgium.

It comes from the Czech Republic - from Plzeň, hence the name. (And wikipedia says it was part of the Austrian Empire at the time the brewery was founded, in 1839.)

Which leaves the list entirely free of Belgian beers - a terrible oversight!

But Scheme is a family of beers - possibly Cambridge microbrews, but there might not be enough of those. So if not, Scheme is the Belgian abbey ales - all of them, one for each implementation.

Guinness is not challenging enough to be Haskell, despite the promise of its color. Haskell is Gulden Draak ("Golden Dragon"), a Belgian Tripel, meaning high alcohol content — at 10.5%, higher than Colt 45! — and intense flavors which can include cider, chocolate, plums, honey, raisins, toffee, and coffee. A little goes a long way — drink too much, and you'll have grand dreams of conquering the world, which will be hampered only by the need to extricate yourself from the flowerbed that you've just tripped over and fallen head-first into.

Egads

Pilsner Belgian? What was I thinking? :)

I probably should have identified some B&D language out there (one of the really unpleasant ones to use; far moreso than Java or Pascal) as a concoction which I've heard identified as "autobahn bier"--but for which I cannot find any evidence on the Internet (perhaps the wrong term?) According to my correspondent in this matter (a co-worker who spent some time working in Germany), driving on the autobahn while drunk gets you a permanent forfeiture of your drivers' license. As a result, a popular beverage for motorists is "autobahn beer", essentially unfermented beer. It's reported to be rather nasty stuff. I don't discount the possibility that this could be an urband legend, or a joke the locals played on some gullible yankee in their midst.

But still--to drink that sorta swill, one must be desperate. I think I'd rather have German tapwater. :)

Gulden Draak sounds like it may have too many--ahem--side effects to represent a pure functional language like Haskell.

If Programming Languages were Airlines

Another entry along the same lines: If PLs were Airlines.

PLs and Philosophers

if programming languages were cars

If programming languages were cars…:

Lisp
At first it doesn't seem to be a car at all, but now and then you spot a few people driving it around. After a point you decide to learn more about it and you realize it's actually a car that can make more cars. You tell your friends, but they all laugh and say these cars look way too weird. You still keep one in your garage, hoping one day they will take over the streets.
Smalltalk
… is a small car originally designed for people who were just learning to drive, but it was designed so well that even experienced drivers enjoy riding in it. It doesn't drive very fast, but you can take apart any part of it and change it to make it more like what you wanted it to be. One oddity is that you don't actually drive it; you send it a message asking it to go somewhere and it either does or tells you that it didn't understand what you were asking.

Compare to the simile culled from Smalltalk, the Language of Gods:

Smalltalk is an amazingly well designed system/environment/language. It's clean, clear, precise, understandable, and in general done right. …

The environment looks very long in the tooth... Squeak feels like Macintosh circa 1989. It feels like driving a 1965 Mustang... everything is in its place, but it's got an AM radio, a 3 speed manual transmission, and no air conditioning.

… and this (Ejacs: a JavaScript interpreter for Emacs):

So... the best way to compare programming languages is by analogy to cars. Lisp is a whole family of languages, and can be broken down approximately as follows:

  • Scheme is an exotic sports car. Fast. Manual transmission. No radio.
  • Emacs Lisp is a 1984 Subaru GL 4WD: “the car that's always in front of you.”
  • Common Lisp is Howl's Moving Castle.

Emacs Lisp can get the job done. No question. It's a car, and it moves. It's better than walking. But it pretty much combines the elegance of Common Lisp with the industrial strength of Scheme, without hitting either of them, if you catch my drift.

… and this ( Lisp — The Ducati Of Programming Languages):

I asked the first question that came to mind: “So what's it like to ride a bike?”

“When you drive a car”, he said, “there is a disconnect between your thoughts and the machine. You sense it, but you're never really conscious of it until you get a bike. You want the car to accelerate, you add some gas, and then you have to wait for a split second before the car listens to you. On a bike this delay is so much smaller, your brain doesn't really register it. You think of something, and you're there. A bike becomes a part of you — an extension of your body. You'll probably need a Ferrari to achieve such unity with a car.”

A Common Lisp compiler is not just a tool - once you acquire a critical mass of knowledge it becomes an extension of mind and body. You think of where you want to be and a few keystrokes later you're there. Your mind doesn't have enough time to notice the delay. Hacking Lisp programs is such a fluid process that it's hard to think of the machine as an external entity. Common Lisp is the Ducati of programming languages.