Why Are There So Many Programming Languages? - Part 2

"So, if C was such a powerful language, why didn't it remain the sole dominant language ruling every domain, every program, and every software ever created? Why were Python, JavaScript, Java, and Go and a hundred other languages created?"
This was the question which we ended the previous part with. To give you an analogy, it's like asking why we have bicycles, bikes, cars, ships and airplanes when horses could get us around. Each serves a different purpose.
The world kept expanding and trying to solve some of the problems with C is painfully long and inefficient. And this is where the story of specialization begins. Think of it like this, early humans did everything themselves - farming, building shelters, hunting and cooking. But as civilizations evolved, we got different people taking up different occupations, specializing in one thing - we got farmers, builders, doctors, chefs etc. Programming languages, sort of, followed the same path.
Rise of Object-Oriented Thinking
One of the biggest shift after C was OOP (Object-Oriented Programming). It is about writing code based on how we see the world. If you are to write the properties of a dog in C, you will do something like, dog_color, dog_weight, dog_name and some functions like walk_dog, feed_dog etc. But in OOP, we get all of this together by creating objects, which contain both properties and functions bundled.
"The whole is greater than the sum of its parts." - Aristotle
So in OOP, you'd define a Dog blueprint (which is called a Class) which says "Every dog has a name, age and a color. It can eat and walk and sleep.". Then, whenever you need to create a dog in your code, you will reference this class to create a dog object with that particular dog's properties. Every dog will have its own name, age and color. It's like having self-contained units.
This concept makes code much easier to understand, maintain and reuse in large programs. That said, it shouldn't always be the go to. Think before you apply. Sometimes simple functions can do :-)
C++: "C with Classes"
The first big step in that direction was C++ which was also created at Bell Labs, just like C. He initially called it C with Classes, because that's what it is.
C was good for system-level programming – things close to the hardware, like operating systems. But as software grew more complex, especially for large applications, managing all the interactions with just C became difficult. C++ allowed programmers to keep C's efficiency and control over hardware while making organization easier with OOP.
C++ became the go-to for complex applications, game development, and high-performance computing where speed mattered, but organization was also crucial.
While C++ was making big applications more manageable, a whole new area was opening up: the World Wide Web. Suddenly, people wanted programs that could run on different types of computers, over networks, and easily interact with information spread across the globe.
Java: "Write Once, Run Anywhere"
Created in the mid-1990s, it had a revolutionary idea at its core, "Write Once, Run Anywhere".
Remember how C programs needed to be compiled specifically for the type of computer it's running on? If you wrote a C program on Windows, it wouldn't run on Mac or Linux without recompiling it.
Java solved this by introducing something called a Java Virtual Machine (JVM) between the code and the system. It is like a universal translator mini-computer running on your actual computer. When you write Java code, it's compiled into an intermediate form called bytecode. This bytecode isn't tied to any specific type of computer. Instead, the JVM on any computer will take the trouble to understand and run this bytecode on the particular type of computer it is running on.
Java quickly became immensely popular for enterprise applications and large-scale systems because of its portability, security features and its strong support for OOP.
JavaScript: "Interactive Webpages"
Around the same time as Java, another language was born with the specific purpose of making webpages interactive. Before this, the webpages were plain HTML and CSS. You can view them and they were colorful as well but not interactive. Just text and images. Couldn't click on a button and have something happen in the page. JavaScript changed that by running on browsers and allowing dynamic content like menus and forms bringing life to websites.
Without JavaScript, the web as we know it today – with its rich, interactive experiences like social media, maps and streaming services – simply wouldn't exist.
Fun Fact: A common misconception is that Java and JavaScript are related because of the "Java" in the name. But they are two completely different languages made for different purposes. It was just a marketing gimmick by Netscape, the company that created JavaScript, to capitalize on the growing popularity of Java at the time.
Ober a decade later Node JS was also born with the intention of running JS on the servers, not just browsers, powering backend as well. So with Node JS, JavaScript became a full-stack language, meaning one can use same language for both frontend and backend applications.
This is an advantage, when you need faster development as you don't need a developer who knows different languages and one doesn't need to switch between two different languages when working on frontend and backend.
Python: "Code should be Readable"
Python, created in the late 1980s (though I am mentioning it after Java, it was created even before that), initially didn't have the explosive growth as Java. But it gained immense popularity later, due to its philosophy that code should be readable first and developers should spend more time on actual logic with fewer lines than C and CPP.
Python also transforms the code to bytecode behind the scenes and runs it on Python Virtual Machine (PVM), but it doesn't involve an explicit compilation step like Java, and does the compilation on the fly, leading to its tag of "interpreted language". Meaning, if you write a code with Java, due to its static typing and explicit compilation step, you will be able to catch many issues before runtime.
But still, Python is much more easier to learn, and it has a vast ecosystem with countless pre-built libraries for data science, AI, web development etc. Due to its simple syntax and the libraries available, you can easily prototype and test your ideas.
Python became the language of choice for data scientists, AI researchers and basically anyone who needed to get things done quickly without sacrificing much performance.
Go: "Minimalism and Concurrency"
Google faced a massive problem: their systems were incredibly complex, highly distributed, and needed to handle millions of requests concurrently (at the same time). Existing languages often made this difficult or error-prone. So, Go, often called Golang, was created at Google in 2009.
Its philosophy is it be simple, efficient and has concurrency as a core part of its design with "Goroutines". While other languages do support concurrency with the concept of "threads", Goroutines are generally much more lighter (consume less CPU and memory) and faster.
It is very fast in compilation, its built-in concurrency features make it ideal for building things like web servers and microservices (small, independent parts of a large application) and it avoids many complex features found in other languages (like inheritance from traditional OOP), making it easier to maintain by introducing new ways to handle the same things.
So, Why So Many?
Just like one wouldn't go to a dentist for a stomach problem, different problems require different specializations with different tools. C++ is great for operation systems, JS is great for webpages, Python is great for data science and Go is great for highly concurrent services. Each language comes with a set of rules and philosophy, some prioritize speed, some readability and others safety. Just like a vibrant community and libraries made Python a de facto standard language for data science, the ecosystem plays a role in which language you choose for your application.
As the world evolves, needs change and new languages will keep emerging.
You don't need to learn every language you heard of. Knowing, why a language exists, what problem it's trying to solve, its strengths and weaknesses, helps you choose the right tool for the job.
"For every tool there is a task, and a tool for every task."




