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.18K 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

There is no “best” language any more than there is a “best” hammer or a “best” knife. The tool fits the job.

I need you to get it done fast and quick? Python.

I need you to do Stats and data analysis? R knows what you need.

I need you to be a small part of a really big development team and have your code interface with other people’s code. Java has you covered.

The thing that gets lost on non-programmers is how effortless it is to change between languages . “You get used to it, though. Your brain does the translating. I don’t even see the code. All I see is blonde, brunette, redhead.”

Anonymous 0 Comments

There is no “best” language any more than there is a “best” hammer or a “best” knife. The tool fits the job.

I need you to get it done fast and quick? Python.

I need you to do Stats and data analysis? R knows what you need.

I need you to be a small part of a really big development team and have your code interface with other people’s code. Java has you covered.

The thing that gets lost on non-programmers is how effortless it is to change between languages . “You get used to it, though. Your brain does the translating. I don’t even see the code. All I see is blonde, brunette, redhead.”

Anonymous 0 Comments

Cars are all designed to do the same thing: Transport people and cargo from one place to another. They are all generally based on wheels and feature a common control interface (steering wheel and pedals).

However, within the task of transporting people and cargo from one place to another, there is a lot of variation. How far are you driving? How expensive is gas? Do you care about looking cool? Does speed appeal to you? How much cargo do you need to carry? What type of cargo? How many people do you need to carry? Is range important? How developed are the roads around you?

And that is how, with the same general requirements, you get diverging types of cars, such as sports cars, minivans, sedans, pickup trucks, jeeps, and more. While one can do the job of another, generally, it will not be as efficient, or maybe it won’t be as safe. You can technically replace a transit bus with a motorcycle, but you will need a lot more of them, and you can expect insurance to go up. You can use a formula 1 car for your daily commute, but the average person has no idea how to drive one and probably won’t get very far.

Programming languages are very similar. They all serve the purpose of allowing a human to tell a computer to do something. If you know what you are doing and are not concerned about speed, ease of use, and safety, they are all essentially interchangeable. However, those factors – speed, ease of use, and safety mean that certain languages tend to be developed to serve certain niches, much like how cars tend to be developed to serve certain use cases.

Some programming languages are very good at giving you a lot of control over everything (C is an example of this, ). However a lot of this control can be very overwhelming at first. Other languages (Python) trade some of that control for user friendliness (in this case by automatically deciding how you want to store your numbers). In car-land, a formula 1 car allows you to do a lot of cool stuff, but all of the complicated settings and buttons mean that most people will opt for a normal vehicle.

Some programming languages are very good at allowing you to do things right away. Hot take, I like MATLAB for this. Press run, your code just runs. Type a statement into the terminal afterwards to append something you missed, it just runs.

C on the other hand is comparatively difficult to get running standalone as you need to run your C code through another program called a compiler, and then run it, potentially on another machine entirely… It takes a lot to get running, but it runs far faster once it starts.

A car example would be a dragster and a minivan. To start a minivan, you get in, turn the key, and you’re driving! If you suddenly find out you need to pick up a television, you just put the seats down and throw it in the back. If you’re joined by 7 people, chances are they will fit. However you won’t be driving very fast. It takes a lot of effort to start a dragster, and you can’t really steer much once you are going, but you will take off going extremely fast. You definitely won’t be picking up a TV, though.

There are a few other examples bouncing around in my head, but this post is already long enough.

Anonymous 0 Comments

Cars are all designed to do the same thing: Transport people and cargo from one place to another. They are all generally based on wheels and feature a common control interface (steering wheel and pedals).

However, within the task of transporting people and cargo from one place to another, there is a lot of variation. How far are you driving? How expensive is gas? Do you care about looking cool? Does speed appeal to you? How much cargo do you need to carry? What type of cargo? How many people do you need to carry? Is range important? How developed are the roads around you?

And that is how, with the same general requirements, you get diverging types of cars, such as sports cars, minivans, sedans, pickup trucks, jeeps, and more. While one can do the job of another, generally, it will not be as efficient, or maybe it won’t be as safe. You can technically replace a transit bus with a motorcycle, but you will need a lot more of them, and you can expect insurance to go up. You can use a formula 1 car for your daily commute, but the average person has no idea how to drive one and probably won’t get very far.

Programming languages are very similar. They all serve the purpose of allowing a human to tell a computer to do something. If you know what you are doing and are not concerned about speed, ease of use, and safety, they are all essentially interchangeable. However, those factors – speed, ease of use, and safety mean that certain languages tend to be developed to serve certain niches, much like how cars tend to be developed to serve certain use cases.

Some programming languages are very good at giving you a lot of control over everything (C is an example of this, ). However a lot of this control can be very overwhelming at first. Other languages (Python) trade some of that control for user friendliness (in this case by automatically deciding how you want to store your numbers). In car-land, a formula 1 car allows you to do a lot of cool stuff, but all of the complicated settings and buttons mean that most people will opt for a normal vehicle.

Some programming languages are very good at allowing you to do things right away. Hot take, I like MATLAB for this. Press run, your code just runs. Type a statement into the terminal afterwards to append something you missed, it just runs.

C on the other hand is comparatively difficult to get running standalone as you need to run your C code through another program called a compiler, and then run it, potentially on another machine entirely… It takes a lot to get running, but it runs far faster once it starts.

A car example would be a dragster and a minivan. To start a minivan, you get in, turn the key, and you’re driving! If you suddenly find out you need to pick up a television, you just put the seats down and throw it in the back. If you’re joined by 7 people, chances are they will fit. However you won’t be driving very fast. It takes a lot of effort to start a dragster, and you can’t really steer much once you are going, but you will take off going extremely fast. You definitely won’t be picking up a TV, though.

There are a few other examples bouncing around in my head, but this post is already long enough.

Anonymous 0 Comments

Power is Work over Time.

If you have two languages and one takes a hundred times more time to develop the same feature (work), it’s less powerful.

Silly analogy aside, all programming languages are equally “powerful.” There is nothing you can do in one that you can’t do in another. The only complication is how elegant and/or fast it is to do it, though some will intentionally restrict certain approaches.

Anonymous 0 Comments

Subjective aside, each language has an origin, structure, and “original intent”. These three features create a unique character to each language.

Since all programming metaphors involved cars, consider this…

A shopping trolley is designed to be pushed and steered from behind. A horse cart is designed to be pulled; so is a Surry; so is a rickshaw. A car is steered like the shopping trolley but the wheels are turned to make the direction changed instead of casterring in response to torque at the rear.

Each vehicle has a unique character for a subtly government function. They can each carry different
Loads in different conditions in a uniquely optimal way that none of the others can service ideally.

Some languages are as dangerous as a band saw, best assayed by a skilled programmer of tight diligence coercing the physical world (C, assembly, Verilog, etc.). Another language might be safe as houses, even coddling the programmer, so that they can focus on high maths most programmers could never understand (Matlab). Erlang is safe in a different way, designed to crash and restart in a very fast and predictable way and replace running code in a running system on demand so that Erickson telephone equipment will keep running no matter what. Fourth is brittle but infinitely recursive, designed to run in the tiny footprint of a telescope controller in the sixties, destined to be reborn as Postscript, which allows unlimited graphical imaging on anemic processors that could fit in printers in 1986. It the Pascal P-System that runs the Voyager spacecraft (launched in the 70s) because it’s can never crash, from which the Java virtual machine was largely cribbed.

There’s a large clump in the middle of the pack.

And every few years pundits make money writing books and articles claiming some new language is the final best language.

The clever programmers learned to translate ideas into at least a handful of languages so that the best language for a job can be pulled into position.

It’s a very soft set of distinctions and opinions.

Anonymous 0 Comments

Subjective aside, each language has an origin, structure, and “original intent”. These three features create a unique character to each language.

Since all programming metaphors involved cars, consider this…

A shopping trolley is designed to be pushed and steered from behind. A horse cart is designed to be pulled; so is a Surry; so is a rickshaw. A car is steered like the shopping trolley but the wheels are turned to make the direction changed instead of casterring in response to torque at the rear.

Each vehicle has a unique character for a subtly government function. They can each carry different
Loads in different conditions in a uniquely optimal way that none of the others can service ideally.

Some languages are as dangerous as a band saw, best assayed by a skilled programmer of tight diligence coercing the physical world (C, assembly, Verilog, etc.). Another language might be safe as houses, even coddling the programmer, so that they can focus on high maths most programmers could never understand (Matlab). Erlang is safe in a different way, designed to crash and restart in a very fast and predictable way and replace running code in a running system on demand so that Erickson telephone equipment will keep running no matter what. Fourth is brittle but infinitely recursive, designed to run in the tiny footprint of a telescope controller in the sixties, destined to be reborn as Postscript, which allows unlimited graphical imaging on anemic processors that could fit in printers in 1986. It the Pascal P-System that runs the Voyager spacecraft (launched in the 70s) because it’s can never crash, from which the Java virtual machine was largely cribbed.

There’s a large clump in the middle of the pack.

And every few years pundits make money writing books and articles claiming some new language is the final best language.

The clever programmers learned to translate ideas into at least a handful of languages so that the best language for a job can be pulled into position.

It’s a very soft set of distinctions and opinions.

Anonymous 0 Comments

Power is Work over Time.

If you have two languages and one takes a hundred times more time to develop the same feature (work), it’s less powerful.

Silly analogy aside, all programming languages are equally “powerful.” There is nothing you can do in one that you can’t do in another. The only complication is how elegant and/or fast it is to do it, though some will intentionally restrict certain approaches.

Anonymous 0 Comments

All programing languages are the same in that they break down into what amounts to a few actual commands: store a number in memory, read a number from memory, do math on some one or two numbers in memory.

The differences fall into the following camps:

Low level vs High level: this refers to how “human readable” the language is, lower level programs offer greater degrees of control over exactly what the computer does at each step but higher level languages are generally easier to develop with.

Compiled vs interpreted: this is a little technical but I’ll try to be simple. At some point, the instructions need to become what’s called “machine code”, with a compiled language another program called a compiler takes the code as written and converts the whole thing into that machine code which can then be run as many times as you want, interpreted languages have a program called (you guessed it) an interpreter which converts only one line instruction at a time into machine code. Some languages fall I to the middle where a compiler makes an intermediary file that is then interpreted, but that’s overly technical for this.

Execution time: corollary to the previous one, it’s universally true that a fully compiled language will run faster than a language that is interpreted, and some languages are just very fast at doing things while others are slower.

Task specific optimization: there are sever languages that are designed to be used for particular use cases, R for example is only used for statistics but is quick both in development and execution though only for that type of task.

Install base: your browser has javascript, the fact that your browser has javascript means that everyone who wants to have their website do fancy things can count on javascript to run on your computer, similar to the “over 3 billion devices run Java” thing you see when you install or update that. This is a consideration because you probably want to be sure about how many computers will be able to run your program.

Developer get hyped: deva are people, and sometimes get excited about new things and want to try them out or push for them to get adopted by more people.

A big corporation wanted a proprietary language that they could charge for: Microsoft is responsible for a few languages, I don’t know off the top of my head if they charge you to use any of them but it’s not off the table for a company to do that sort of thing.

One of the funny things about deciding that you want to invent a new programming language is that step one is usually to lean C, and then you’ll probably realize that making a new language just isn’t worth it.

Anonymous 0 Comments

All programing languages are the same in that they break down into what amounts to a few actual commands: store a number in memory, read a number from memory, do math on some one or two numbers in memory.

The differences fall into the following camps:

Low level vs High level: this refers to how “human readable” the language is, lower level programs offer greater degrees of control over exactly what the computer does at each step but higher level languages are generally easier to develop with.

Compiled vs interpreted: this is a little technical but I’ll try to be simple. At some point, the instructions need to become what’s called “machine code”, with a compiled language another program called a compiler takes the code as written and converts the whole thing into that machine code which can then be run as many times as you want, interpreted languages have a program called (you guessed it) an interpreter which converts only one line instruction at a time into machine code. Some languages fall I to the middle where a compiler makes an intermediary file that is then interpreted, but that’s overly technical for this.

Execution time: corollary to the previous one, it’s universally true that a fully compiled language will run faster than a language that is interpreted, and some languages are just very fast at doing things while others are slower.

Task specific optimization: there are sever languages that are designed to be used for particular use cases, R for example is only used for statistics but is quick both in development and execution though only for that type of task.

Install base: your browser has javascript, the fact that your browser has javascript means that everyone who wants to have their website do fancy things can count on javascript to run on your computer, similar to the “over 3 billion devices run Java” thing you see when you install or update that. This is a consideration because you probably want to be sure about how many computers will be able to run your program.

Developer get hyped: deva are people, and sometimes get excited about new things and want to try them out or push for them to get adopted by more people.

A big corporation wanted a proprietary language that they could charge for: Microsoft is responsible for a few languages, I don’t know off the top of my head if they charge you to use any of them but it’s not off the table for a company to do that sort of thing.

One of the funny things about deciding that you want to invent a new programming language is that step one is usually to lean C, and then you’ll probably realize that making a new language just isn’t worth it.