r/AskComputerScience • u/[deleted] • Aug 04 '20
Why so many computer programming languages?
Is it possible to do everything with one language like Python or C++?
I am wondering why there is so many different programming languages.
55
Upvotes
10
u/claytonkb Aug 04 '20
We know from basic computer science that it is possible to do everything[1] with a universal Turing machine. On first brush, it might seem like we can "simplify" computer design by converging on just one language (so that everyone can speak the same language) but it turns out that, while it's theoretically possible, the practical obstacles outweigh any marginal benefits of not having to learn more than one programming language.
See switching barriers for further reading/research.
As for why there are various programming languages, it is helpful to look at the problem of program design from the perspective of programming paradigms. A paradigm is a "way of thinking" and it turns out that different ways of thinking naturally conform to different programming frameworks. These frameworks can all be translated from one to another, in principle. But there are large costs associated with such translations. Instead, certain problem domains tend to gravitate towards certain paradigms that are a "natural fit" for that domain.
And if you thought there were a lot of programming languages listed on Wikipedia, wait until you look at the list of esoteric programming languages (oddly, an NSFW link). I tend to enjoy the esoteric perspective because it decouples the form and function of a language from "what it's for" (use-cases). While use-cases are important from a commercial standpoint, starting from use-cases is not necessarily the "right way" to design a language. The creative spark within me tends to believe that the ideal programming language would have no real-world use cases. It would just ... be.
[1] -- We mean "everything" in the sense of symbol-manipulations... any task which can be expressed as manipulations on (a finite set of) symbols can be performed by a universal Turing machine. This is often called the Church-Turing thesis. There is also a strong version of this thesis which makes the metaphysical claim that everything (ontologically, that is, anything whatsoever, whether physical, symbolic, mental, emotional or otherwise) can be represented (simulated) by some computation of a universal Turing machine. Of course, this is not a scientific or mathematical claim, this is philosophy...