Why So Many Programming Languages?

"But why do I have to learn Python?" She wailed, "I like Scratch!"

"I know," I said, "But there are different programming languages for different sorts of tasks."

"That's stupid" she said

The little girl in Terence Eden's story is easy to sympathize with. In high school I got heavily into Turbo Pascal and felt I could accomplish a great deal with it. Then college arrived: my first course was Java, the second Assembly. I was so resentful. Why couldn't I just program in the language I was already comfortable with? I felt that way for four years and then changed majors. I'm more adventurous about hopping between languages now, but not by much.

The answer to why we have different languages is that, to some degree, they do different things. Sometimes a program could be written the same way in multiple languages and you simply pick the one you prefer.

The real answer is that some programming nerd (in the most endearing sense) figured they could build a better language, one that likely reflects modern needs and styles. So they did, then convinced a bunch of other nerds it was a good idea, and the language gained steam. It's a miracle of sorts.

We don't see this on the client-side web, because getting every major browser to ship an entirely new language would probably be easier than colonizing Mars. The web instead innovates through slow evolution and at the framework level.