Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are there so many programming languages? [closed]

You may think this question is stupid or something but as a new IT student, I think that when i learn one language (ex. java), I tend to forget the one I learned before (ex c)... or I mixed-up the syntax.... So why not merge everything into one so students don't need to learn many languages... then kill the useless programming languages... Why not create a standard like the sql????

like image 289
newbie Avatar asked Dec 02 '10 12:12

newbie


3 Answers

Different languages address or embrace:

  • Different needs (performance in specific areas, reliability, ease of expressing niche programs etc)
  • Different platforms
  • Difference models (functional, OO etc)
  • Different histories

There are many programming languages which are "general purpose" and others which are specific to a particular situation... but even within the "general purpose" programming languages, no language stands out as being ready to replace all others.

Note that even with your example of SQL, most DB vendors have their own extensions to SQL, which are required to take the database beyond "here's a query, give me a table of results".

like image 124
Jon Skeet Avatar answered Nov 18 '22 00:11

Jon Skeet


programming languages have evolved over the time as computers got more powerful and took their way into many application fields.

In the beginnings, the ressources were very limited and one needed programming languages very close to the machines, like Assembler, Cobol and so on.

Nowadays, there is so much processing power that we can use highly sophisticated programming languages like Java and C# which make programming very comfortable, but not very efficient in respect to CPU cycles.

Each programming language has it's own target. For embedded development, mainly Assembler, C and C++ are used. There are many other languages for this purpose. For web development there are many languages available, each with a focus on another aspect of easing the work. There are languages working on every plattform like Java and languages making Windows programming very easy, like VB.NET.

When you learn a programming language, your goal should not to only learn the syntax, but to get a understanding of the principles of programming. If you got this, you can learn other languages quickly as far as they follow the same paradigms (object oriented, procedural, functional,...)

like image 2
Matten Avatar answered Nov 18 '22 01:11

Matten


While the idea of 'one language to rule them all' is an interesting theoretical idea, any language that tries to be all things to all situations is going to eventually topple over under it's own weight.

For example, while we are seeing interesting changes in C# to make it more functional or more dynamic, a language that tries to be all things and to put just too much into it's core syntax will eventually have issues where very subtle differences in syntax can have some unexpected behaviors.

A language should help the user express intent vs. force them to fight the compiler, etc. to achieve that intent. For example, immuteability is harder to do in C# than in F#. Some things are easier and more expressive to do in Ruby vs. a language with static types, etc. - This can even go to the extreme of cases where we build our own languages (DSLs) to better help us express intent.

In my career, I've coded in Cobol, Fortran, C, Pascal, VB, C#, VB.Net, Javascript, and Ruby (not to mention things like XAML, SQL, HTML, CSS, etc.)

Language is not just about syntax - that's the easy part. Rather, it's abut learning the specific idioms of that language, and leveraging it's unique strengths to solve your problem. And by knowing a variety of languages, you can better determine which language offers the right features to best solve the issue at hand in a way that is expressive, maintainable, and elegant.

like image 2
Bob Palmer Avatar answered Nov 18 '22 02:11

Bob Palmer