How Similar Are Programming Languages?

Written by jure | Published 2020/06/29
Tech Story Tags: programming | programming-languages | coding | learning-to-code | programming-languages-compared | javascript | c++ | python | web-monetization

TLDR The most frustrating thing is choosing between two programming languages that are similar, but are they? Yes, programming languages are similar but not that much. The basics of every programming language are pretty much the same, but the way you write and use those basics to solve problems differs a lot for every language. Python and JavaScript are mostly used for the same things and code looks very similar. The higher the language is, the easier it is for people to use it. Python, JavaScript and Java are also similar, their code doesn’t look the same.via the TL;DR App

Everyone is saying that programming languages are similar, but just how similar? Does it mean that if you know one programming language you know all the others?
The most frustrating thing is choosing between two programming languages that are similar, but are they? Yes, programming languages are similar, but not that much. The basics of every programming languages are pretty much the same, but the way you write and use those basics to solve problems differs a lot for every programming language. Let’s explain that a little bit more.

How Similar Are Programming Languages

How similar programming languages really depends on which programming languages you’re looking at. If, for example, you compare how you define a variable, which is pretty much a most basic piece of code that you can write, in JavaScript it looks something like this:
let word = "Hello";


And in Python it looks something like this:
word = "Hello"
As you can see, it doesn’t look too much different. The only difference is that you need to use this to let prefix in JavaScript before you define a variable and a semi-colon at the end.
Let’s take a look at another example, an if statement. If statement is the most used piece of code in the world. It basically goes, if something is true or is false, do something.
In JavaScript it looks something like this:
if (hour < 18) {  
let greeting = "Good day";
}
In Python it looks something like this:
if hour < 18:

greeting = "Good day"
Again, not too much different. In JavaScript, you put your condition inside the parentheses, and in Python, you don’t use parentheses. You need let to define a variable and a semi-colon, which is something that similar to a full stop at the end of a sentence.
These very just two examples of how different the basics are. Those so-called basics or syntax are specific to every programming language as you saw above, but the concept is the same. If you understand an if statement in JavaScript, with a little bit of thinking you’ll understand it in Python.
If you want to know how the basic syntax looks for every popular programming language you can go to W3School and check.
Also, keep in mind that here I am comparing Python and JavaScript, which similarity on the scale of 1-10 is about 5 or 6. C++ and JavaScript would be about 9 or 10.
Also, Python and JavaScript are mostly used for the same things. If you would take a programming language like Swift, which can be only used to make IOS apps and Java, which is used almost exclusively for Android development code would look very different. There would be very little carryover knowledge from one language to another.

Which Programming Languages Are Similar

As I’ve said above, not all programming languages are equally similar, some are very different and some are almost the same, those are the ones we are going to take a look at.
First, we need to take a look at the use of certain programming languages, that highly affects their similarity. If a programming language is used only for web development it’s not gonna be similar to languages that are used for making Android apps.
JavaScript and C++ are two languages that are very similar. They can be used to make the same things and code looks very similar. The only difference is that C++ is s lower-level programming language, which means that it’s a little bit less optimized for people to use it. You know that computer uses 1 and 0, think of that ass the lowest possible programming languages. That comes C++, and then JavaScript.
The higher the language is, the easier it is for people to use it.
Python, JavaScript, and Java are also similar, their code doesn’t look the same, but they are used for the same things and are equally difficult to use.
Some programming languages like PHP are completely isolated, they don’t have many similarities with other programming languages, and their code looks very different.
Basically, if the programming languages are used for the same things, they are very similar and you won’t need to do much learning to transition from one to another.
The next question that you might have after you’ve chosen a programming language for your needs is where you should learn it. I think that if you have some money, courses are a great option. You can check this article where you can find my article about the best programming courses that I recommend for every beginner starting learning to code.

Conclusion

I hope that this makes clear to you that you won’t need much time to transition from one programming language to another as long as you want to do the same things with them.
If you think that I’ve missed something, just post your question in the comments below.
Now you know that if you are thinking between two programming languages, you can choose any one of them as long as the same things can be done with both of them.
Do you know multiple programming languages? Are they similar to you?





Written by jure | Hi, my name is Jure Reljanović. I like learning about coding and technology and helping others by sharing my experience.
Published by HackerNoon on 2020/06/29