An Analogy

If programming languages were building materials, Python would be mud.

  • It’s everywhere.
  • If you need to slap something together, it’s easy—just wash your hands afterwards.
  • If you need to change it, you just push on it, and it deforms around you.
  • But if you push it too far, it falls over, and if you leave it out in the sun for a few days, it dries out and turns brittle.

If programming languages were building materials, C++ would be cinder blocks.

  • They’re cheap but they’re heavy.
  • You can build stuff out of them, but only by stacking them on top of each other.
  • You better put ones on the bottom in the right places, because you won’t be able to move them later.
  • And if you need to change the shape of what you’ve built, you’re taking the blocks down one by one and building the new shape.

If programming languages were building materials, Haskell would be an Erector set.

  • You have to go out and buy it.
  • The first time you open the box, you have no idea what you’re supposed to do with it.
  • There are lots of different kinds of pieces, and if you put them together in a way they don’t like, they’ll tell you.
  • But you can make big things with very little material,
  • And if you put the gears and pivots in the right places, it can move around how you want without putting undue stress on the structural members.