Why are there many programming languages
Why are there so many programming languages?
I'm pretty fluent in C / C ++ and can find my way around the various scripting languages (awk / sed / perl). I started out a lot more with Python because it combines some of the nifty aspects of C ++ with the scripting capabilities of awk / sed / perl.
But why are there so many different programming languages? I suspect all of these languages can do the same thing. So why not just stick to one language and use it to program computers? In particular, for some reason, it's me should know a functional language as a computer programmer?
Some related reading:
Programming languages evolve and improve over time (innovation).
People take ideas from different languages and combine them into new languages. Some functions have been improved (inheritance mechanisms, type systems), others added (garbage collection, exception handling), others removed (instructions, low-level pointer manipulations).
Programmers use a language in a certain way that is not supported by any language construct. Language designers identify such usage patterns and introduce new abstractions / language constructs to support such usage patterns. There were no procedures in assembly language. No classes in C. No exception handling in (early) C ++. Not a safe way to load new modules in early languages (just in Java). No built-in threads (easy-peasy in Java).
Researchers are considering alternative ways to express calculations. This led, among other things, to Lisp and the functional language branch of the language tree, Prolog and the logical programming branch, Erlang and other actor-based programming models.
Over time, language designers / researchers learn to better understand all of these constructs and how they interact, and design languages to incorporate many of the common constructs, all of which are designed to work together seamlessly. The result is wonderful languages like Scala that incorporate objects and classes (expressed by characteristics instead of single or multiple inheritance), functional programming functions, algebraic data types that are well integrated with the class system and pattern matching, and actor-based parallelism.
Researchers who believe in static type systems are eager to improve their expressiveness by allowing things like typed generic classes in Java (and all the wonderful things in Haskell) so that a programmer can have more guarantees before executing a program that things don't go wrong. Static type systems often represent a great burden for the programmer (entering the types), which is why this burden has been alleviated through studies. Languages like Haskell and ML allow the programmer to omit all type annotations (unless they are doing something difficult). With Scala the programmer can omit the types in the method inventory in order to simplify the work of the programmer. The compiler inserts any missing types and informs the programmer about possible errors.
Finally, some languages support certain domains. Examples are SQL, R, Makefiles, the Graphviz input language, Mathmatica and LaTeX. Integrating the functions of these languages into general-purpose languages (directly) would be quite cumbersome. These languages are based on abstractions that are specific to their respective domains.
Without further development in the design of programming languages, we would all continue to use assembly language or C ++.
What the Knowledge of a functional programming language is concerned : With functional languages you can express calculations differently, often more precisely than with other programming languages. Consider the difference between C ++ and Python and multiply it by 4. As mentioned in another answer, functional programming gives you a different way of thinking about problems. This is true of all other paradigms; Some are better suited to some problems and some are not. This is why languages with multiple paradigms are becoming increasingly popular: you can use constructs from a different paradigm without changing the language, and more difficult to mix paradigms in one software.
tldr: There is no Silver Bullet language.
Hope they won't sue me, but here is a picture from one of the Stanford presentations.
When you choose a language, you can just two of these three functions choose .
And that's why people are sad and want to invent a super language that covers all three.
In fact, there is a huge list of requirements (you can see some of them in other answers) but they just add details about the core functionality. In addition, there are historical and political reasons for choosing one language over another.
Combinations of such factors result in a new language.
( And I've heard that every good programmer should write their own new language;) )
The world is filled with things that have many different variations: word processors, cars, household designs, drinks, candy, pens, shovels, etc. The reasons we have so many can be summed up on a few principles:
- Someone thinks they can improve existing products
- A different design is required based on local considerations (think: houses on stilts or houses on concrete slabs).
- A new product category covers a need that did not exist before
Go to an office supply store and check out the Writing Instruments section - there are hundreds of types of pens out there. They all do roughly the same thing: put ink on a writing surface. But every pen you see for sale is there for one of the three reasons listed above.
- Cartridge fountain pens are an improvement over dipped fountain pens, which are themselves an improvement over quills.
- NASA needed a pen that could write without gravity, so the pressure rollerball was invented.
- The very first pencil itself might have been a pointed stick dipped in tar or blood. Before that, people would scrape together stones or paint pigments with fur on the walls. (Just a guess.)
The development of the pens continues as no product meets the needs of every user. Some pens are cheap and disposable; others are expensive and made from high quality materials. some use gels, some use ink, some use pigments; Some have twist-off caps, others have no caps at all. wide barrels, narrow barrels, round barrels, square barrels; short long; red, white, black, blue. Etc.
But enough about pens.
Our current multitude of programming languages can be traced back to the very first: the numerical machine codes for early computers in the 1940s. Primitive, difficult to use, and tedious to get into the computer, but they did the job. It didn't take long for the programmers to assign mnemonic words (such as ADD, CALL, LOAD) to the machine codes, creating the language class "assembly languages".
Different processor architectures required different memory codes, depending on the specific characteristics of the underlying machines. Taking these differences into account meant inventing different assembly languages.
(Maybe now you can see where this is going ...)
Programmers looked at their assembly language programs and saw patterns: the same sequences of instructions were used to create loops, conditions, variable assignments, function calls, and so on. This is how procedural programming languages were born. These languages encapsulated instruction groups under umbrella terms like "if", "while", "let" etc.
Functional languages emerged from a mathematical analysis of computer programming - a completely new way of looking at computation. Not better, not worse, just different.
And then there is object-oriented, statically typed, dynamically typed, late binding, early binding, low memory usage, high memory usage, parallelizable, specific-use languages, and so on and so forth.
Ultimately, we have different programming languages because we have different programming languages want . Every language designer has their own ideas of how their "dream" language will look and work. Diversity is one quality Thing.
Functional programming languages are usually based on the different (but performance equivalent) calculation model: the lambda calculation. There are some untyped languages (with Python-like typing) like LISP, Scheme (used for the widely recognizable structure and interpretation of computer programs in books / courses) and statically typed languages like Haskell, ML, F #.
SICP got me into functional programming, but other people recommend this John Hughes paper and interview with him.
Functional programming is now being promoted by Microsoft, for example, who included F # (their functional language for .NET) in VS2010 and 11. They also employ some Haskell developers in MSR, IIRC.
Note that there are also some functional programming languages that do not come from the Lambda calculation, such as B. Refal, which is based on pattern matching and rewriting.
Because the level of abstraction is different in functional languages, your attitude towards problem solving changes when you use functional programming techniques. Some say it can make you a better programmer in general.
As a computer programmer, is there a reason I should be able to speak a functional language?
Yes. Because haskell has changed the way I think. It could also change the way you think.
Story: I used to think I could each Learn programming language in one day. One day I founded Haskell. I finished everything that came before monads in half a day. It's been a year since that day and I'm still hopelessly stuck with monads.
Language and Thought Wiki
Notation as a thinking aid by Kenneth E. Iversion, lecture on the Turing Award
But why are there so many different programming languages?
Notation is a thought-provoking tool. We need different bespoke notations to be comfortable with different thoughts. So we create new languages.
Also read. ;-)
There could hardly be a programmer who is not at some point frustrated by the limitations of the language used and has decided to scratch his itch. So a new language - or a dialect of an existing one - is born.
In "A Theory of Objects" Abadi and Cardelli develop a whole family of programming languages based on object-oriented principles. They prove that functional programming is a special case of OO, but not the opposite.
Inventing something new is fun. Therefore, people are more likely to create another language than to help improve an existing language. Of course, there are language administrators who do not welcome changes in their perspective. The best example is the gap between Common Lisp and Scheme followers.
Why are there so many countries in the world? Wouldn't it be easier if we only had 5 or 6 superpowers or even a universal kingdom of earth? It's easy to argue why it wouldn't be better - first of all, competition can lead to progress in different countries, and in terms of democracy, human rights, etc., many countries can be better than one - - but that doesn't explain Why we have many countries. It just explains why many countries would be better .
Likewise, one may wonder why so many different human languages? Polish, Arabic, Mandarin ... Wouldn't it be easier if there was only one language? One could argue one way or the other, but those would be reasons why it would be better if life was one way or the other. It wouldn't explain Why there are so many different human languages.
The thing is, there are a lot of people on the planet and we all do our thing, we all have our opinions, we all want to be in charge and have our own country or programming language, and we often think we can do better know than others, or at least don't bother to understand what others have to offer.
Read this very insightful blog post: Why So Many Python Web Frameworks? Apparently there is roughly in Python 50 Web frameworks. It's just ridiculous; There is absolutely no reasonable reason for this. But the author of the post replies: There are so many Python web frameworks because it is so easy to make one . You don't need a reasonable reason for there to be more Python web frameworks or more programming languages. People will keep creating new ones because they don't know what's already available, or because they hope they can make money, or because new things are just fun to create!
Let me give you a personal example. About 10 years ago I wrote C ++ code for a Finnish company. You know, in Finland there are these huge trucks that go long distances and deliver a lot of stuff from one place to another. I'm sure there are trucks like this in America too. So a typical problem is to make sure that all around 24 tires are in order. Of course, there is proven technology: pressure and temperature can be monitored, and drastic changes suggest that something has gone wrong. Of course, all of this technology is proprietary, patented, and has all implications. (Remember: patents are supposed to encourage innovation!) So the Finnish company wanted to recognize the condition of the tires through ... sounds. The idea was to install microphones to hear the sound from all of the tires and apply some kind of signal processing spell to those sounds to see if any of the tires had a problem and I made a prototype of this madness. (They even had a special lab for recording sample sounds. Once they sent me a stunning video recording on a certain occasion when they managed to explode a sample tire after putting 5 or 10 tons of pressure on it ridiculous temperature.) Of course, there was no particular rational reason for this development here either, except that it was fun and some people wanted to make money. So also understand that there are so many reasons why someone would develop a new programming language. There is no need or even opportunity to learn them all. (They even had a special lab for recording sample sounds. Once they sent me a stunning video recording on a certain occasion when they managed to explode a sample tire after putting 5 or 10 tons of pressure on it and hit a ridiculous temperature.) Of course, there was no particular rational reason for this development here either, except that it was fun and some people wanted to make money. So also understand that there are so many reasons why someone would develop a new programming language. There is no need or even opportunity to learn them all. (They even had a special lab for recording sample sounds. Once they sent me a stunning video recording on a certain occasion when they managed to explode a sample tire after putting 5 or 10 tons of pressure on it and hit a ridiculous temperature.) Of course, there was no particular rational reason for this development here either, except that it was fun and some people wanted to make money. So also understand that there are so many reasons why someone would develop a new programming language. There is no need or even opportunity to learn them all. Once they sent me a stunning video recording on a particular occasion when they managed to explode a sample tire after being pressured to 5 or 10 tons and heated to a ridiculous temperature.) Again, there was no particular reason for this development, except that it was fun and some people wanted to make money. So also understand that there are so many reasons why someone would develop a new programming language. There is no need or even opportunity to learn them all. Once they sent me a stunning video recording on a specific occasion when they managed to explode a sample tire after being pressured to 5 or 10 tons and heated to a ridiculous temperature.) Again, there was no particular reason for this development, except that it was fun and some people wanted to make money.So also understand that there are so many reasons why someone would develop a new programming language. There is no need or even opportunity to learn them all.
Of course, all of this is only true if you believe in evolution. If you believe in some form of intelligent design that God created all programming languages, then you should find a purpose behind this multitude. Perhaps God wanted to encourage competition between different programming languages so that the art of software development would reach its highest possible level.
In summary there are many people, many countries, many programming languages. That's just the nature of life! Let's be grateful for that: this just means that the programming / computer science field is very much alive and well.
Why are there so many different programming languages?
Because there are decisions to be made:
- Type of specification: imperative vs. functional
- Typing: statically typed vs. dynamically typed
- Evaluation order: Call-by-Value vs. Call-by-Name
- Modularity: Class-based vs. abstract data type-based
- Execution model: sequential vs. simultaneous
Fortunately, the last two are insignificant dichotomies, meaning you could combine both choices in a single programming language. However, the first three dichotomies make 8 combinations. So even in an ideal world there are at least 8 programming languages. When you drill down, you have more nuanced design options within certain paradigms. For example, if one decides to use a class-based statically typed language, there are several ways to design the type system. There is still no canonical way of doing this. If you decide to use a parallel programming language, there are different ways to represent the parallelism: semaphores, conditional critical areas, monitors, messaging (synchronous vs. asynchronous). Within synchronous messaging
Part of our research in programming language theory is devoted to solving these dichotomies. For example, I worked on resolving the dichotomy between imperative and functional programming in an article entitled "Tasks for Application-Oriented Languages". Our method has now been adopted by Haskell and is both a functional and an imperative language. This does not mean that the dichotomy is completely resolved. A Haskell programmer is still faced with the choice of whether he wants to solve his problem functionally or in a mandatory manner. Luca Cardelli worked on solving the dichotomy between static and dynamic typing. Paul Levy worked on solving the dichotomy between call-by-value and call-by-name. Not all of these results have yet been implemented in real programming languages.
If all of these languages can do the same thing, why not just stick to one language and use it to program computers?
Because for a programmer in the real world, it's not enough just to do something. How it's done is also important. When properly executed, the problem domain is correctly represented in the program, the modularity of the problem is preserved, and the programs are easy to understand, change, and maintain. All of these things affect you costs program development and maintenance. They also affect the reliability and security of the software.
For example, many people use a program called "Quicken" for financial accounts. The original program was developed in an internal version of Visual Basic and was quite good. However, it was difficult to expand and maintain. Over the years as the company tried to expand it for newer features, the program became increasingly buggy with millions of dissatisfied customers everywhere. You will likely benefit from redeveloping the software in a strongly typed object-oriented programming language.
As a computer programmer, is there a reason I should be able to speak a functional language?
Historically, "functional programming" was invented by Godel, Kleene, and Church according to standard mathematical practice, and "imperative programming" was invented by Turing to capture the concept of mechanical computation. Before Turing, there is no evidence that mathematics ever analyzed imperative programming ideas. (While all traditional mathematical algorithms were expressed in an "imperative style", their essential content was still functional.) Therefore, imperative programming is very new to human civilization, and its math is still not very well understood. The main reason everyone should know about functional programming is to understand how programming can be mathematical. (I'm not admitting that imperative programming is not mathematical. That's what working programmers would have you believe. But I would agree that at the current state of the art, we don't yet know how to do imperative programming mathematically. Lots of we are working on exactly this problem.)
You could think of it as evolution.
In the beginning, computers were only programmed with binary codes. After that, mnemonics and assembly languages were introduced, which for the most part strongly depend on the CPU used.
After the introduction of the higher languages (3rd level) (Pascal, C, ADA, Cobol) some were kept very general (like C), others more suitable for data processing (Cobol), others for calculations (Fortran).
After that, fourth-level languages emerged, such as logic languages (such as prologue). The most common languages are the successors of foreign languages. Some of them are Java, C #.
We also see specific languages for Internet / Web, such as ASP.NET, PHP.
And languages for a specific domain (DSL), which mostly work together with a generic language.
Then there are languages in which children can learn to program, such as LOGO.
Also languages for writing code quickly, such as Python, Ruby, etc., languages for dealing with XML (XSLT).
And I've probably forgotten a lot of languages and even categories of languages.
Other answers are good, will add a few new angles. While DC writes, develop Languages just like real human languages! and they borrow concepts and syntax again like real human languages. In other words, there is also a fairly real study of the etymology of computer languages.
This also means that there is a long history and timeline, mainly starting around the 1930s with lambda calculus.
There is a strong interaction / synergy / symbiosis between theory and application with programming languages. New applications are invented, which leads to new theories and vice versa. A programming language is in many ways a bridge between theory and application .
An interesting case study from history is Fortran. it is not known, but previous versions of Fortran (mostly before Fortran77) had ambiguous grammar. This means that the same command from the compiler legitimately on could be "interpreted" / compiled differently as there were several valid "interpretations" (this is not the same technical sense for "interpreted" languages).
So formal grammar theory was developed around the time Fortran was invented, and it was a bit of a crisis when the problem of language ambiguity was discovered. The henceforth syntax was reformulated to avoid this ambiguity, and later languages showed greater sensitivity to grammar ambiguities in their design. OOP is also a very important / prime example of a theoretical concept / advance in programming languages that "drifts" or "ripples" into and transforms many existing languages.
Other case studies are the invention of new technologies. For example, the invention of the relational database has had a tremendous impact on computer languages, e.g. B. with SQL and computer language interfaces (e.g. in Java, "JDBC"). Likewise the World Wide Web with an even greater impact. Immediately around the dot-com boom, there appeared to be an explosion of languages that largely coincided with the early growth of the WWW and could be compared to evolutionary explosions.
There also seems to be a long trend for new programming languages to increase in connection with the massive exponentially increasing computing power of Moore's Law, which some believe is slowing down.
The current long-term trends in programming languages seem to be moving in the direction of big data and parallelization, e.g. B. with MapReduce. There is currently also an interest in closings.
Another important aspect of languages is that they more and more levels of abstraction represent. They build on lower level abstractions to create higher level abstractions (similar to a pyramid). In this way, the progress of computer language development is likely to be endless, and we can be reasonably certain that important new ones will continue to be invented in the future. This is likely analogous to a similar concept in psychology called chunking.
Anyone who has studied many computer languages has to admit that a herd mentality can be observed where some aspects turn out to be overhyped fads, i.e. not as critical as advocated, or even die out over time (in use)! Some of the core ideas / changes remain, but the (over) hype is subsiding. In this sense, programming languages also fall out of the Fashion . Two cases from my point of view from the last half decade, which are useful but have been revised:
Increasingly, self-similarity can be observed in many major languages, so that they all tend to implement many similar functions in their own way, that is, like product comparison charts that "check off" many functions in a grid.
It wasn't you, it's just a marketing ploy - making the language look somewhat like "C" then it lowers the obvious barrier to entry.
Some that have no C influence at all: SQL, Pascal, Delphi, FORTRAN, COBOL, Ada, PowerBuilder, HyperTalk, Lisp, Simula, FOKAL, BASIC, PL / I, Algol, Algol-68, SNOBOL, Modula, Visual BASIC , Tutor, Logo, Forth, DIBOL, Helix, AppleScript, Python, Erlang, Ruby, Selection, English, RPG, PL / SQL, ASP, Prolog, SmallTalk, Perl, Bash, Magic Wand BASIC, REXX, DOS batch language.
- Where can I find out more about MMR
- Why can't I love someone
- Is ZocDoc a zombie company
- All fish can be fried
- How can Quora be made better
- Is learning AngularJS a prerequisite for Angular2
- What does Lucifer look like
- Where's John Williams
- Website listed on Skyscanner
- What's your safe name
- Babies withdraw from Subutex
- Is there still hope in this relationship
- What problem does Findery
- Where is Kailash in the world
- What are ineffective writing techniques
- What is epoxy coated rebar
- Can you explain evolution to me?
- How does litmus paper work
- What are the biggest myths about vegans
- What is computer data structure
- What happened to Jetix
- How do you prepare before speaking in public
- What exactly do doctors do during childbirth
- When do sounds qualify as music