What makes different programming languages “better” than others? Or more powerful? Why have different languages developed over time? Are they all based on the same thing?

1.28K views

What makes different programming languages “better” than others? Or more powerful? Why have different languages developed over time? Are they all based on the same thing?

In: 187

78 Answers

Anonymous 0 Comments

A lot of comments in here about programming fundamentally works.

To really break it down to ILI5, yes there are some things that make certain languages “better”, it’s all about preference to the programmer in the end. There are also certain things about programming languages that attract more users to that language.

For example, JavaScript is embedded in every modern web browser. It grew in popularity with developers who wrote code for the browser, and because those developers already knew the language, JavaScript also became popular as a server language because they already knew JavaScript and it made transferring between tasks a lot easier when you only need to know one programming language.

Programming languages also attract certain users over use cases, because of what “Libraries” are available for that language. You can imagine a “Library” as similar to a physical library, there are lots of books that provide certain information. A programmer fills out such “libraries” with scripts, imagine a library that contains all the information related to the biology of cats. If you need to know the biology of cats, do you rewrite your own books, or do you simply use an existing library? A lot of libraries (especially for basic functionality) are provided by the Language themselves, so you don’t have to do the work.

There are lots of sites for online sharing such libraries, C# has [NuGet](https://www.nuget.org/), Java has [Maven](https://maven.apache.org/), JavaScript has [NPM](https://www.npmjs.com/), Ruby has [Gems](https://rubygems.org/), and there are others for other languages.

There are a lot of Language specific features that may make one more enjoyable to work with as well. I’ve taken a liking to C# because it supports things like Null-coalescing operations. A “Null” value is Nil, it means nothing has been set. With Null-coalescing you can check for these “undefined” values, and set to a fallback very easily.

What you can do as this in C#:

string x = null;
x ??= “Hello World”;

Is this in Java:

String x = null;
if (x == null) {
x = “Hello World”;
}

One is much less to have to type out than the other.

You are viewing 1 out of 78 answers, click here to view all answers.