Are all programming languages the same?



No! But there is something to be said about the question. We can print hello world in every language. Every programming language worth its salt is Turing complete. Meaning, you can rebuild the language using the same language.

But programming languages are different. Each comes with its own preconceptions and rules. For example, PHP is a great language for web programming. A lot of its functionality assumes that you are going to use it in a web environment. But if you are trying to do graphic programming with it, you might find a few hurdles.

I watched a comedy on YouTube with my wife. It was in French but subtitled in English. There was a part a man was saying.

Monsieur le president, Madame la presidence,
Monsieur le prefet, Madame la prefecture,
Monsieur le maire, Madame la mairie,
Monsieur le peuple, Madame la population.

At every single line, I was cracking up. My wife read the same thing in English, and there was absolutely nothing funny to her. The worse thing to do about a joke when someone doesn't get, is to try to explain it. But to understand the joke, you first have to understand the language. Second, you have to understand the country the man speaking was from. And third, you have to look at his uniform... Each of those reinforce the joke in a way that is not obvious.

Programming languages are like jokes in a language. You can tell the same joke in many languages, but the translation will not be one to one. You have change part of it to be relevant to the culture of the audience. In programming term, this will be the context. If you want to switch from PHP to Golang for example, you'll have to remember that you don't get your web server globals for free. You have to learn a new syntax for your template engine. You have to remember to return your errors. You have to write a panic recovery scheme.

And, you also have to consider that for the same outcome, different languages will use a different method. Good luck handling your web sockets connections in your PHP instance.

In other words, you can print hello world in every language, but it still doesn't mean you will program it the same way.