By relieving the brain of all unnecessary work, a good notation sets it free to concentrate on more advanced problems, and in effect increases… mental power — Alfred North Whitehead
Programming languages are for people — not computers. Computers don’t need any programming language other than machine code. Good programming languages help make problems easier for people to reason about. This is important because writing code is not just about solving problems. It’s also fundamentally about how you think, communicate, and comprehend.
Language and Idea
“The words available in a programming language for expressing your programming thoughts certainly determine how you express your thoughts and might even determine what thoughts you can express.” — Steve McConnel
There’s an old joke that goes something like this.
In Heaven: the cooks are French, the lovers are Italian and the bankers are Swiss.
In Hell: the cooks are English, the lovers are Swiss and the bankers are Italian.
Along the lines of this joke, if we want to write well about cooking, we should write in French. While we might be able to write about cooking in English, we would be lacking in the vocabulary and paradigms present in French that are essential to cooking. And, in fact, if you know about cooking, you know this is true! There are many terms central to cooking that are specifically French. Even if you are writing an English cookbook, you use these French words (e.g., mise en place, Bain Marie, Coulis, &c.).
Here’s the Haskell code:
In Haskell, functions are automatically curried. Currying is part of the Haskell paradigm. As a Haskell programmer, I know this. It influences every bit of code that I write. The way that I think about how to create a function — i.e., solve problems and communicate — involves currying at some level.
- Decision fatigue
- Multiple paradigms (the Ramda way, the Lodash way, the Folktale way, some random NPM module…)
- More code to manage (more code to read and comprehend)
To sum up, we can state our own version of Whitehead:
A good programming language, applied to the appropriate domain, can increase your problem solving ability. A bad language — or one that’s a poor fit — can make things harder.
Languages and Problem Solving
Knowing the impact of a language on problem solving and communication, it should come as no surprise that programming languages are often created to solve specific problems. A few examples:
- Ada was written to work with embedded and real-time systems.
- Erlang was designed to write telephony applications.
- ALGOL was designed to clearly describe algorithms.
- Pascal was written to teach students structured programming.
Modern web apps are written to solve a wide variety of problems. We should have a diversity of programming languages. We should be able to work with languages that were designed for our problem space, that fit our way of working with problems, or that we want to learn something from.
We Can Do This Now
The Road Forward
- If there are tools to help with debugging, many are immature (though Elm’s debugger looks quite promising).
- Tuning and performance improvements to your scripts can be challenging.
Innovation always comes with a cost. So does stagnation. The costs of stagnation are higher. If we’re going to make progress in front-end development, we must have more diversity. Someone needs to lead the way. When there are enough developers who use a given language in the web app space, there will be a motivation for the tool creators, vendors, and community to give their support. Even if we only end up with two or three dominant languages, we’ll have richer vocabularies and paradigms to work with.
- The topic of Language and Thought is a rich one. If it is interesting to you, you may enjoy this article: https://www.linguisticsociety.org/resource/language-and-thought