Programming languages can be intimidating to someone who is unfamiliar with them, but put simply, developers use programming languages to convert needed functionality into precise instructions that a computer understands.
For example, if you select a shipping option during a website checkout process, that’s because a programmer used a particular set of instructions to create and enable that functionality. When Trifecta Technologies works with a client, our architects choose the programming language – or several – that will best translate the client’s business needs into functionality.
It may surprise many people that there are hundreds of programming languages currently in use. Just like human languages, they can be categorized into families and grouped based on the features of the language.
There are languages that many developers use, while there are some that only a handful of developers understand. Why so much diversity? What difference does a parenthesis here or a semicolon there make? The features of a language are determined by its designers, who are guided by the decree of “use the right tool for the job.”
Programming languages are complex by nature
Programming languages are distinct from human languages because they ultimately need to be interpreted and understood by a computer, not another person. Behind the curtains, the human-written code gets retranslated to simpler and simpler instructions until the instructions can be executed by the CPU.
Because of this nature, programing is rooted in mathematics; specifically, the mathematics of the simplest understandable instructions and the mathematics of retranslating to get to those instructions. With math as the basis, it’s easy to see why there is so much diversity among programming languages. Anything that can be described using math can be described in the context of a language.
The mathematical basis for programming languages also hints at a fundamental difference between software engineering and other engineering practices. Most other fields of engineering function within the rules and limitations of the problems provided for them – structural engineers must work within gravity and physics, and engine designers work within thermodynamics. These systems, provided by and unbreakable by nature, create the framework for everything they create.
In programming, however, only the languages allow and restrict what functionality is available. Programming languages define what is easy to build, how complex a feature is to adapt and evolve, and the very nature of problem-solving in a given context.
Similarities between programming languages and spoken languages
Programming languages also share some characteristics with human languages. For example, both are learned most quickly through immersion and experience. Even more fundamentally, the core objective of a language is to describe an idea. Both programming languages and human languages share this objective, only differing by the target.
Most interestingly, as much as the wording is shaped by the author, the author is molded by the language. The language frames how the author thinks. The adage known as Maslow’s hammer, “it is tempting, if the only tool you have is a hammer, to treat everything as if it were a nail,” captures the essence of how tools shape the way a developer approaches a problem. That’s why programmers often disagree on their language preferences – pattern of thinking shapes minds, but also clashes or meshes with existing natural and cultivated patterns.
Things to consider when selecting a programming language
While the choice of language can be personal and subjective, there are definite benefits and drawbacks for any language. So, programmers must learn to choose – or build if it doesn’t exist yet – the language that is the most descriptive, adaptable, and understandable, yet doesn’t allow for errors.
These goals, however, rarely harmonize and actually often stand in opposition to each other. For example, languages that are more flexible are necessarily more ambiguous, and languages that are stricter require more forethought. Java’s language features are generic and simple enough that most programmers can understand them, which is why it’s usually the one that students are taught in. But its omission of complexity results in a lot of boilerplate code or frameworks and libraries to do often-repeated functionality.
These differences also affect the manner in which developers solve problems, which is why language choice is vital. A language can be the scaffolding on which great ideas are built, or the cage in which a developer’s thoughts are stifled.