How Similar Are Programming Languages?

How Similar Are Programming Languages? hackernoon.com2 years ago in #Dev Love65

@jureJure Jure is a founder of Codequickie and WhistleX. He likes technology, sports, and computer games. 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: 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.  » Read More

Like to keep reading?

This article first appeared on If you'd like to keep reading, follow the white rabbit.

View Full Article

Leave a Reply