Why are there so many programming languages?

483 views

Why are there so many programming languages?

In: 9

7 Answers

Anonymous 0 Comments

There is an element of xkcd 927 at play, but mostly the different languages do different things. There is a concept of levels of abstraction in programming languages: at one end you have assembler which is directly interpreted by the computer but is almost unintelligible to a person, at the other end you have Visual Basic or Perl which are as close to normal human language as possible, but need to be turned into something that the computer hardware actually uses.

Other examples might be Python and Matlab, which look pretty similar. Python is all things to all people and so can be used for a wide variety of tasks but is perhaps not optimised for any of them. Matlab is specifically built around handling large matrices (sort of multi-dimensional tables of data) which makes it great for research and certain sorts of maths. Anything you can do in Matlab you can probably do in Python, but your code might be messier and take longer to run.

Then there is the whole field of web languages like Java[script], these are built to let you do the sorts of things people do on websites. Originally that meant displaying text but of course now there is so much more than that.

Anonymous 0 Comments

Would you use a screwdriver to dig a huge hole in the ground? Well probably you could, but using a shovel would be much easier and faster to achieve the same result.

In the same way, in the time IT has been around, multiple specialized languages were developed to do the same things much easier. You have SQL to query relational data, you have javascript to run applications on browsers, java for enterprise applications, c++ for videogames and many others.

Obviously the same language can be used for multiple purposes, e.g. C# is used both for enterprise applications and games, but the main reason to create a new language is doing the same thing easier.

“Being easier” is also referred to the abstraction level. The C language exists because we needed a language that was easier to learn (compared to assembly) but also able to run blazing fast. Java was originally created with the idea of having a single language that worked the same on all platforms, which is not true for languages like c++.

Anonymous 0 Comments

Computers talk in 1s and 0s, humans don’t. Programming languages are ways to make it easier for human language to get converted into 1s and 0s, and the other way around.

Computers are complicated, and so is language, so programming languages are built to talk to the computer in different ways.

Some languages are designed to give the computer line by line instructions, some are designed to create stand-alone software. Some are really good at math, and some are really good at graphics.

It’s not easy for most people to “think” like a computer, so programming languages try to be as easy to use as possible. This means that they are like tools, none of them can be used for everything, so they make a kit together.

There isn’t one universal programming language because one hasn’t been made that can do everything without being impossible to learn.

Anonymous 0 Comments

* programming languages are generally somewhat specialised for use in certain applications, for example C is great for writing operating systems and hardware drivers, Perl is great for writing short scripts to manage and edit files, Julia is great for doing science, and Javascript is great for making websites – it’s proved very difficult to design a single language that works well for all of these things

* there are many different styles of programming that people prefer over others for various reasons, for example there are “declarative” programming languages in which you code various general facts and rules and state what the desired outcome is, as opposed to the more usual “imperative” languages in which you give the computer direct commands

* programming languages are often tied to specific hardware to some extent – in extreme cases you get things like APL which basically requires a special keyboard layout, but also older programming languages tend to have poor support for newer hardware features such as multi-core processors, while newer programming languages often don’t support old hardware at all

* companies often want to use their own in-house programming language instead of relying on a third-party language that they have no control over, so you often end up with languages that are very similar except for who controls them, such as C# (Microsoft) and Java (Oracle, formerly Sun Microsystems)

* programming languages never really die, because there is always code from older languages that’s still in use, and it’s generally easier to keep maintaining it in a mostly forgotten language than to rewrite the whole thing in a newer language

Anonymous 0 Comments

Because “This language sucks, I’m going to make my own!”. Boom, now we have two languages that suck.

Read up on lex and yacc if you want to go make your own. They’re not THAT crazy complicated. After you grok regex. And parse trees. And get over the 1970’s style manuals.

Anonymous 0 Comments

Programming languages are words used to mean specific things – usually actions. Languages can have more words to mean more specific things, but there is a cost. You have to learn more words and how to use them.

Planting a seed means putting a seed in the ground and possibly covering it up so that it is ready to grow. If you are a farmer, having the word “planting” is helpful as you probably say it a lot. If you are a janitor in a city you may never use the word planting and having had to learn it in school was just annoying and took time away from something else.

So computer languages are written to have planned uses. Some are for general use, some are for very specific uses. They words in the programming language are then created to be generally useful or to do that specific thing.

Basically think of programming languages as having the jargon of different jobs. If you are a doctor you want a doctor language, if you are an auto mechanic you want an auto mechanic language.

Anonymous 0 Comments

The major split being: The *lower level* the language is, the closer it is to the actual hardware and more efficient it is when you run it. The *higher level* it is, the closer it is to human language. How ever higher the level of language more work there is to turn it in to commands that are in low level, which are the kind that the OS and hardware actually understand and use. It means the language is slower and less efficient, however easier for humans to work with.

After this the languages really split in to having different properties that the coder might want or need to utilise. These can range from mathematical functions or structures. Sometimes you might need different languages working together to achieve what you want. Granted… All languages will end up to the lowest form of language, raw binary, because this is how our computers work.

You could actually do everything you need at the lowest level of language if you wanted to. However just as every engineer knows, or should know, there is no point making a part that you can buy off the shelf. Languages have libraries that are filled with functions and structures you can call. Instead of using raw and simple C and by hand coding what is required to flip an array of text like “abcd” by using just one byte of memory. You load in a library which has functions to work with strings and can do this with a single function that you can call. In a really high language you could just write: “*Take the string and flip it*” and the compiler knows what you want and makes the code accordingly.

Now different languages are on different levels, and have different properties. Each having a trade off in functionality, ease of use and efficiency. Although with better and better hardware, more and more storage and memory, you can use language that is less efficient.

Back in the day of first proper programmable languages, you had to work in binary, and even then you had a very limited range of actions you could do. Only things you had to work with were basically: addition; subtraction; Increment; decrement; and basic logic of And/ Or/ Xor. Now basically everything could be done with this, just painfully slowly and in a complex manner. You just have to consider that 3×2 = 2+2+2.

However there are lots of language which are a person or group of them, that thought that they can do something better and make a more functional standard that is just going to be better. Which end up being a mix of different languages, functions, or work in a syntax or logic that they considered better. But the main division of languages are trading efficiency, functions and human understandability.