Answers.Body: <p>There is a conflict of interest between organisations and developers which I believe is partly responsible for the creation and adoption of new languages.</p>
  <p>Organisations would probably want a single universal language because it would drive salaries down.</p>
  <p>However an individual developer would be well advised to stay ahead of the curve and learn additional languages because it will improve their earning potential.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-05T16:01:03.680Z
Answers.LastActivityDate: 2022-01-05T16:01:03.680Z
Answers.UserDisplayName: Thomas Turrell-Croft
Answers.Body: <p>One more aspect:</p>
  <p>Every non-trivial software project uses its own, problem-specific language. So, effectively, we have millions of programming languages in use.</p>
  <p>How that?</p>
  <p>Bigger software projects always consist of multiple layers, where the lower-level (library) functions help to make the higher-level ones easier to write and understand.</p>
  <p>Designing software in layers effectively means to create (in the lower layer) the vocabulary you want to use in the next-higher layer, thus <strong>creating the language you want to use for expressing your solution</strong>.</p>
  <p>So, in a way, there are no two programs using the same language, as they all introduce lots of problem-specific vocabulary.</p>
  <p>With bigger software projects, knowing the base programming language (like C, Python or Java) is by far the less challenging task. Understanding the problem-specific vocabulary (framework, classes, fields, methods, ...) plays a much greater role.</p>
  <p>So, effectively, the top software layer for a given problem will look very much the same, no matter what base language was chosen. Only, it's packed into the syntax of the base language. E.g. using Java syntax (but would look quite similar in C, C++, C# and a lot of others)</p>
  <pre><code>Problem problem = readProblem();
  Solution solution = computeSolution(problem);
  writeSolution(solution);
  </code></pre>
  <p>Even in an &quot;exotic&quot; language like LISP, you'd recognize the same pattern:</p>
  <pre><code>(let* ((problem (read-problem))
         (solution (compute-solution problem)))
      (write-solution solution))
  </code></pre>
  <p>You see, there's much more problem-specific vocabulary than base language in these lines of code.</p>
  <p>So, why do we still have different base languages? Because we choose a language where the base concepts plus the available libraries come close to the problem-domain. If we choose the wrong base language, we waste development effort (= money) for creating the vocabulary for the higher-level functions that come for free in other languages.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-04T16:07:44.107Z
Answers.Text: It seems you have replicated your answer rather than correcting/editing it. better to merge this into that I think??
Answers.UserDisplayName: Rushi
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-05T17:33:20.820Z
Answers.Text: If you're limiting the comparison to procedural imperative languages.
Answers.UserDisplayName: JDługosz
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-15T00:31:03.950Z
Answers.Text: Object Oriented Programming Systems (Oops!) make this idea of a custom hammer for every nail more explicit. Many people say it is an unhelpful approach, but many say it is indispensable. I guess it depends on how good you are at using (and selectively not using) the technique.
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-04T15:40:05.550Z
Answers.LastActivityDate: 2022-01-04T15:40:05.550Z
Answers.UserDisplayName: Ralf Kleberhoff
Answers.Body: <p>From a pragmatic (software engineering) perspective...</p>
  <p>The world is filled with pre-existing pieces of software, written in different languages. Even if someone invented a new &quot;perfect&quot; programming language overnight, all this existing code would not just automatically disappear. It would remain in use, and someone would need to maintain it. So the new &quot;perfect&quot; language would just be one more language in that heterogeneous landscape.</p>
  <p>Now, if that new language was so good, maybe people would like to translate existing code into the new language. Manual translation would usually be unthinkable (too much code!). Automatic translation might be a possibility, but would often result in the following:</p>
  <ul>
  <li>automatically generated code may look &quot;weird&quot; and unreadable in places</li>
  <li>some aspects of the original language might be impossible to translate automatically</li>
  <li>existing code may be translated incorrectly, resulting in bugs</li>
  <li>existing code may be translated correctly, exposing bugs! (original implementation may only work &quot;by accident&quot;, because of some weird feature of the original language)</li>
  <li>performance might not be as good. Or maybe too good?? (see above. Changes in time of execution can have unpredictible side-effects)</li>
  </ul>
  <p>Regarding the last point, consider hardware. Some languages are much &quot;closer to the metal&quot;, others are much more abstract. Translation between &quot;high-level&quot; abstract languages running on powerful hardware is feasible (nevermind the potential loss of performance, or the extra resources needed, just increase your CPU and/or add more RAM). The same cannot be said of embedded software running on much more specific and limited hardware.</p>
  <p>Consider also the human factor: new language may be great, but existing programmers may find it tedious (and a risky investment of their time) to learn yet another new language. Hence the slow adoption. Also, more money might be made by specialising in maintaining all the old libraries...</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-04T17:25:24.223Z
Answers.LastActivityDate: 2022-01-04T17:25:24.223Z
Answers.UserDisplayName: Wandering Ex-Academic
Answers.Body: <blockquote>
  <p>One language is better.</p>
  </blockquote>
  <p>Unfortunately, no, it is not.</p>
  <p>A language is a tool with specific tasks in mind. We don't go around thinking that we only need a hammer, and we don't need to worry about pliers, screwdrivers or saws just because we have a good hammer (and it is a lot easier to learn how to use a  hammer than using all those other tools.)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-05T23:20:47.740Z
Answers.Text: To a kid with JavaScript, everything is a web page.
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-05T21:56:21.300Z
Answers.LastActivityDate: 2022-01-05T21:56:21.300Z
Answers.UserDisplayName: luis.espinal
Answers.Body: <p>I'm going to echo what <a href="https://cseducators.stackexchange.com/questions/7186/why-there-isnt-one-language-to-use-instead-of-different-programming-language/7187#7187">Buffy said</a>, but in a different manner.</p>
  <p>All of the great languages have a sort of direction that they point in. For instance, the <a href="https://www.infoq.com/articles/excel-lambda-turing-complete/" rel="noreferrer">Excel language</a> (yes! The one from the spreadsheets!) is really great at short scripts that manipulate and represent data. By contrast, the <a href="https://en.wikipedia.org/wiki/C_%28programming_language%29" rel="noreferrer">C</a> language is excellent at telling hardware what to do, while <a href="https://en.wikipedia.org/wiki/Wolfram_Mathematica" rel="noreferrer">Mathematica</a> excels at representing a lot of advanced mathematical functionality very simply.</p>
  <p>There is nominally no task that you can do in any of those languages that you cannot do in the others.  However, you will find it extremely difficult to go <em>against the grain</em> of the language.  Want to create a program to rapidly edit and make visualizations of data in C?  You can do it, but you could spend years on it and never make it as convenient as Excel.  Want to do very small, very fast operations that C makes simple as could be? Excel would rapidly become a nightmare.</p>
  <p>The different languages have been created to optimize different kinds of actions, and the great languages each do exceedingly well at what they are designed for.</p>
  <p>That's the key to why we need different languages.  We need to do different tasks, and we want languages that generally work with us to get us there, and don't actively get in our way all the time.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T00:01:32.927Z
Answers.Text: As best I know, Excel is the most used application on Earth. (Not sure about any other planets.)
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T03:29:20.527Z
Answers.Text: What's good about this answer is your exemplar set : {excel, C, mathematica}. With such a wide-based set the variegatedness  of PLs becomes obvious. What I tried to explain v briefly in [my comment](https://cseducators.stackexchange.com/questions/7186/why-there-isnt-one-language-to-use-instead-of-different-programming-language#comment18650_7186) is that that variety is not just a matter of fact; it's a matter if necessity. That this point obscures the other dimension -- needless variety -- is unfortunately left out (in all answers so far). IOW q is genuine
Answers.UserDisplayName: Rushi
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T11:22:43.103Z
Answers.Text: Different languages for different purposes are not unlike different solutions for various tasks we have in any other domain. E.g. to make drawings on paper we can use pens, pencils, crayons, a laser printer, or an offset press - vastly different methods with vastly different uses.
Answers.UserDisplayName: Frax
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T16:13:03.900Z
Answers.Text: For an example of an unfashionable but useful language in an analog vein to Excel, in a past life I wrote a couple systems in dBase/FoxPro. It was incredibly easy to set up an application to access and use a database for a small business.
Answers.UserDisplayName: Martin Argerami
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-04T00:15:57.510Z
Answers.Text: Note:  "Want to create a program to rapidly edit and make visualizations of data in C?"  This was done; the name of one of these programs is Excel.  Though they may have used C++.
Answers.UserDisplayName: Technophile
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-04T16:18:26.443Z
Answers.Text: @Technophile While Excel itself is written in C or a close derivative, I think Ben I. was referring to the actual formulas end users write into the spreadsheet cells.
Answers.UserDisplayName: 8bittree
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-04T17:57:21.553Z
Answers.Text: @8bittree  I agree; just filling out the "you could spend years on it" part.
Answers.UserDisplayName: Technophile
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-04T20:34:16.230Z
Answers.Text: @Technophile I don't follow.
Answers.UserDisplayName: 8bittree
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-02T20:59:21.200Z
Answers.LastActivityDate: 2022-01-03T13:49:21.607Z
Answers.LastEditDate: 2022-01-03T13:49:21.607Z
Answers.UserDisplayName: Ben I.
Answers.Body: <p>In theory, you only need one language and, provided that it is <a href="https://en.wikipedia.org/wiki/Turing_completeness" rel="noreferrer">Turing Complete</a>, any language will do. But...</p>
  <p>&quot;In theory, theory is the same as practice, but not in practice.&quot; (Often attributed to Yogi Berra).</p>
  <p>If you only ever want to learn one language, it should probably be C, though C has a number of twists and turns that make it difficult to consistently produce error-free software. It is, however, a low (close to the hardware) enough language that you can do anything you like.</p>
  <p>However....</p>
  <p>If you program in a low level language for a long time, or if many people do so, then what you find is that the same sorts of things are being written over and over again and debugged over and over again. This is undesirable, so the practitioners will build libraries that capture things frequently done. But hundreds and hundreds of libraries have their own problems; among them, just finding what you need.</p>
  <p>So...</p>
  <p>People decide that it would be an advantage to &quot;capture&quot; the commonly done things as &quot;abstractions&quot; in a new language built on top of the old.</p>
  <p>In FORTRAN, for example, there were functions that captured commonly needed actions (trig functions, for example). FORTRAN was built on top of machine language, as was C, which also uses functions as its main abstraction mechanism.</p>
  <p>And then...</p>
  <p>Programmers decide that the actual structure of a program is looking a lot like the structure of some other program and so, just maybe, those structures can be captured as language &quot;features&quot;, leading to the writing of new languages.</p>
  <p>Now it starts to get interesting.</p>
  <p>Some folks have the insight that mutability of data isn't really essential to (most) computation and that programs compute <em>values</em>, possibly complex. So a new language, say LISP, is created to capture this insight and it proves fruitful.</p>
  <p>Other folks find themselves doing a lot of modeling of <em>things</em> and so they ask whether the properties and actions of those things can be captured directly at the language level, rather than have to be reconstructed from the simplest actions of something like C. That led to both Simula and Smalltalk (which have some conceptual similarities).</p>
  <p>Now, and this is the important bit:</p>
  <p>A language that does a good job with abstraction will provide to the programmer a complete (in the sense of Turing) and consistent mental model in which to program, making it unnecessary to think about the underlying implementation and even permitting you to forget that there is some machine that a program might manipulate.</p>
  <p>Such a language also provides a mental model of the nature of computation. A functional programmer is led/encouraged by the language (perhaps Scheme) to think in a certain way. Object Oriented Language (Smalltalk...) encourage you to think in a different way. Each of those mental models, if complete and consistent can help you formulate and solve programming problems as they arise. These different mental models are called <em>paradigms</em>.</p>
  <p>Just as you don't need to understand Sanskrit to understand English, you don't need to understand machine language to understand Scheme or Java. Each of those (among many others) provides a model of computation in which you can describe any computable process in a consistent way. Buried in all of that are the earlier libraries that people used to have to build, along with (big big point) the insights that were gained in earlier programming attempts.</p>
  <p>As long as we can envision higher levels of abstraction, there will be an impetus to create computer languages that try to capture those abstractions so that they can be manipulated <em>easily</em> and <em>consistently</em> by working programmers.</p>
  <p>And then, programmers who want to be productive, will try to match the language to the task at hand as well as choosing a language that has abstractions appropriate to that task.</p>
  <hr />
  <p>For an example of what I mean by capturing abstractions, consider the problem of building dynamic data structures such as binary trees and such. In a language like C or early versions of C++ these are specifically allocated (on the heap) but also need to be specifically deallocated somewhere in the program. The implication is that the memory management &quot;problem&quot; needs to be resolved in every program that uses dynamic allocation. Every program. In a language like Scheme or Java, on the other hand, there is a <em>garbage collector</em> that assure that deallocation is done correctly. The garbage collector needs to be verified only once, not redesigned and re-validated for every program. This frees the program to put their mental energy elsewhere.</p>
  <p>I once (unintentionally) put a deallocation bug in a C++ program. The correction took me 24 hours to find. The solution required a one character change to the program. One character progress per 24 hours isn't very efficient.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-02T20:31:20.563Z
Answers.Text: You advocate C as a good first-choice language, and then you talk about allocation bugs. Yep, that's C. But you equivocate C++ with C in that respect and that's wrong. C++ has "RAII" which means that you basically never have to worry about leaks and de-allocation. I teach my students to use `std::vector` for arrays, and they never have memory leaks or deallocation bugs. For students that you would teach in C, modern C++ (meaning 17 and later) is a better language.
Answers.UserDisplayName: Victor Eijkhout
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-02T20:34:16.600Z
Answers.Text: @VictorEijkhout, my comments about C++ are accurate for the time that this occurred. I'll make that a bit clearer. But the programmer there still needs to use the right libraries, so the problem hasn't gone away. So, in a way, you are making my point.
Answers.UserDisplayName: Buffy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-02T21:49:54.627Z
Answers.Text: "you basically never have to worry about leaks and de-allocation" modern C++ helps a bit in that you no longer have to do the deallocation manually, but you still have to think about when it will happen and whether the time it will happen is appropriate for your program.
Answers.UserDisplayName: Peter Green
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-02T22:27:09.693Z
Answers.Text: @VictorEijkhout - `std::vector` and an array aren't the same...
Answers.UserDisplayName: ScottishTapWater
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-02T22:58:50.920Z
Answers.Text: @Persistence I never said they were. I said that if you need something that behaves like an array, always use `std::vector`. Maybe `std::array`, but not `int x[5]`. Or `new int[5]`.
Answers.UserDisplayName: Victor Eijkhout
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-02T23:01:26.197Z
Answers.Text: @PeterGreen For sophisticated enough examples (stack overflow in destructing a very long linked list) you're right. But that's not something beginnning programmers have to worry about. First learn programming with safe mechanisms, worry about the fine points later.
Answers.UserDisplayName: Victor Eijkhout
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-02T23:40:25.830Z
Answers.Text: I think we should resist being encouraged to think a certain way.
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T01:42:41.200Z
Answers.Text: "*that assure that deallocation is done correctly*" Correctly, sure - but now you have a different problem, which is the time delay between a program finishing using memory and the memory being available for use again. On a PC with small quantities of data and ludicrously large RAM, this isn't a problem. But with big data or not much RAM, this fails ***hard***. I have personally seen this when working on a car multimedia box using C# and .NET Compact Framework. I believe team members spent much longer on getting GC to work with limited resources than had we just used C++.
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T16:28:26.860Z
Answers.Text: C would be a terrible choice of first/only language for someone who wants to create "apps, websites, games, AIs, etc." Nobody uses C for these things. I've been a professional business software developer since 2005, and I've never used C at all.
Answers.UserDisplayName: Tech Inquisitor
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T16:47:49.890Z
Answers.Text: @TechInquisitor, yes if you want to do a particular thing, use an appropriate language. But if you want one and only one programming language for everything, then C will work, even if badly for some things.
Answers.UserDisplayName: Buffy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T16:54:34.473Z
Answers.Text: @Buffy The OP didn't say "everything." You're answering a different question.
Answers.UserDisplayName: Tech Inquisitor
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T17:24:08.083Z
Answers.Text: @TechInquisitor, but the OP _did_ ask about _one programming language_.
Answers.UserDisplayName: Buffy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T18:18:39.827Z
Answers.Text: @Buffy ...for a list of purposes that notably does *not* include the kinds of things (e.g., operating systems, embedded devices) that would make C a compelling answer.
Answers.UserDisplayName: Tech Inquisitor
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T20:05:50.510Z
Answers.Text: C is terrible for web sites, but C# is peachy. Because... Someone implemented an environment that makes it work well.
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T21:49:11.490Z
Answers.Text: @VictorEijkhout - wait, now _C++17_ is "modern" (and all else, by implication,  passé)?  My how time flies!  (I'm so old I remember when _C++11_ was considered "modern" ... and we had to wait patiently for a compiler to support it ...)
Answers.UserDisplayName: davidbak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T22:57:33.330Z
Answers.Text: @davidbak, to further emphasize my points, note that while the name remains the same, the language designed by Stroustrup isn't the same as today's C++. It has commonalities, but is a different language in many ways.
Answers.UserDisplayName: Buffy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-04T00:33:06.503Z
Answers.Text: _Just as you don't need to understand Sanskrit to understand English, you don't need to understand machine language to understand Scheme or Java._ Maybe change Sanskrit to Proto-Indo-European? Although I'm not certain that such a comparison is useful since all high level languages must be executed as CPU instructions, whereas the same is not true for natural languages; natural languages don't translate down to a (frequently common) lower level language.
Answers.UserDisplayName: CJ Dennis
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-07T12:07:18.590Z
Answers.Text: @VictorEijkhout - I'd argue that vectors and arrays behave very differently. Sure, you can use them interchangeably for a lot of things but they also have a few very important differences that are crucial to understand. As long as you explain those to your students, I suppose it's not a bad approach though
Answers.UserDisplayName: ScottishTapWater
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-14T21:26:19.720Z
Answers.Text: The first computer language you learn forms your brain and there is a lot to unlearn when going on to other languages.    For that reason alone C is not a good first language, but an excellent choice later if you need to go close to the hardware.
Answers.UserDisplayName: Thorbjørn Ravn Andersen
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-02T14:25:42.120Z
Answers.LastActivityDate: 2022-01-02T21:27:18.280Z
Answers.LastEditDate: 2022-01-02T21:27:18.280Z
Answers.UserDisplayName: Buffy
Answers.Body: <p>The US Department of Defense actually <em>did</em> create and use one programming language for basically all its varied programming tasks for about 10 years. As stated in <a href="https://www.answers.com/Q/A_programming_language_developed_by_the_US_department_of_defense_was_name_to_honor_a_famous_female_mathematician_Name_this_programming_language" rel="nofollow noreferrer">A programming language developed by the US department of defense was name to honor a famous female mathematician Name this programming language?</a></p>
  <blockquote>
  <p>Ada is a structured, statically typed, imperative, and object-oriented high-level computer programming language, extended from Pascal and other languages. It was originally designed by a team led by Jean Ichbiah of CII Honeywell Bull under contract to the United States Department of Defense (DoD) from 1977 to 1983 to supersede the hundreds of programming languages then used by the DoD.</p>
  </blockquote>
  <p>Also, <a href="https://dwheeler.com/lovelace/doduse.htm" rel="nofollow noreferrer">U.S. DoD Use of Ada</a> explains</p>
  <blockquote>
  <p>With various exceptions and waivers the U.S. DoD was required to use Ada when it develops its own software. This requirement was often called the &quot;Ada mandate&quot;. A summary discussion of the U.S. DoD Ada mandate, as well as related documents, are available. The basic text of the Congressional mandate is:<br><br>&quot;Notwithstanding any other provisions of law, where cost effective, all Department of Defense software shall be written in the programming language Ada, in the absence of special exemption by an official designated by the Secretary of Defense.&quot;</p>
  </blockquote>
  <p>In the <a href="https://www.quora.com/Does-the-Defense-Department-still-promote-the-Ada-programming-language" rel="nofollow noreferrer">Does the Defense Department still promote the Ada programming language?</a> Quora thread, the answer by <a href="https://www.quora.com/profile/Rochus-Keller" rel="nofollow noreferrer">Rochus Keller</a> explains that the requirement mentioned above started in <span class="math-container">$1987$</span>. Also, the answer by <a href="https://www.quora.com/profile/Jim-Rogers-38" rel="nofollow noreferrer">Jim Rogers</a> says</p>
  <blockquote>
  <p>A short history of the Ada language mandate is found in <a href="https://acqnotes.com/acqnote/careerfields/ada-programming-language" rel="nofollow noreferrer">Ada Programming Language - AcqNotes</a>. The concluding paragraph indicates that the Ada Mandate was effectively removed in 1997 when the DoD began to embrace Commercial Off The Shelf (COTS) technology.</p>
  </blockquote>
  <p>I've used quite a few different programming languages, but I've never done any programming using Ada, and know relatively little about the language. However, in 1987 (when Ada use was initially mandated) and 1988, I was working for Netron (a Toronto, Ont. company) on a COBOL related project with IBM for Westpac Banking Corporation in Sydney, Australia. I recall a discussion with several programmers (note I'm unsure to what extent any of them had used Ada before) about a major problem with Ada being that it tries to do basically everything, with this making it so large and complicated that it's difficult to learn and use, as well as it not being a particularly good choice for many programming tasks. On the other hand, the Quora <a href="https://www.quora.com/Does-the-Defense-Department-still-promote-the-Ada-programming-language" rel="nofollow noreferrer">thread</a> I mentioned above has several Ada programmers explaining some of Ada's significant strengths.</p>
  <p>In conclusion, since the US DoD was unsuccessful (due to both subjective, as well as objective, reasons) in creating and using one language to fulfill almost all of its myriad requirements, I doubt that any entity, public or private, can create just <em>one</em> programming language to be able to do basically everything well.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T02:19:11.837Z
Answers.Text: Well of course the Ada functionally failed, it was a government project after all... And yes, one of the big issues with Ada is that it tries to do everything. This is a recurring issue with a _lot_ of DoD projects actually.
Answers.UserDisplayName: Austin Hemmelgarn
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T04:45:51.577Z
Answers.Text: Of the DoD projects my favorite was [APRANET](https://en.wikipedia.org/wiki/ARPANET). As bad as it is, it was still a success of some degree.
Answers.UserDisplayName: Gypsy Spellweaver
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T18:26:22.987Z
Answers.Text: Having some industry level experience with Ada, I have observed lots of Ada-“bashing” from people who where actually unaware of many (if any) of its numerous strengths, and how valuable they are once you get acquainted with. Some
Answers.UserDisplayName: LoneWanderer
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T18:30:39.763Z
Answers.Text: Sometimes, I feel that one thing is forgotten : it is not just about tools and usage, but programming community is also subject to trends/hype/fashion, which is not always guided by pure problem<->tool relationship.
Answers.UserDisplayName: LoneWanderer
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T20:00:53.730Z
Answers.Text: And there is that GPS thing, but who uses that?
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T21:54:32.577Z
Answers.Text: Let's be fair to Ada and the government (military), huh?  The situation back then was that for every machine architecture they were buying equipment in - and there were a _lot_, even military "standardized" ones - they _each_ had their own language(s), and thus their own toolsets.  Don't be fooled by the fact that many of those languages were named "JOVIAL" - in many respects they were sufficiently different dialects that there were several (well, at least 2) companies whose entire business model was making one compiler toolchain after another for different JOVIALs for different projects ...
Answers.UserDisplayName: davidbak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T21:55:43.423Z
Answers.Text: ( .... and not just toolchains, but documentation, training, practices, etc. etc. etc. etc.  The military desire/need for Ada was to solve a real problem ...)
Answers.UserDisplayName: davidbak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T23:03:00.820Z
Answers.Text: @LoneWanderer Thanks for the feedback. I tried to have my answer be relatively objective, balanced and fair. Although I don't know much about Ada, I agree it has various significant strengths. I hope you didn't consider my answer to be Ada-"bashing". On rereading it, I realized I could improve its balance so I've edited it, e.g., I mention I'm unsure how much the Sydney programmers knew about Ada, the Quora thread mentions various strengths, and Ada failing was also due to subjective reasons. I hope this is better, but please let me know if there's anything you can suggest to improve it.
Answers.UserDisplayName: John Omielan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T23:03:16.040Z
Answers.Text: @davidbak As I mention in my response above to LoneWanderer, I tried to be fair, but  made some changes just now to try to improve that. Although my knowledge of the US DoD's needs and Ada are very limited, from what I've read & learned just recently when researching for my answer, it seems to me that what you wrote is very reasonable.
Answers.UserDisplayName: John Omielan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-04T11:46:09.447Z
Answers.Text: I do not consider there are any bashing here ;) I feel that the DoD failed with its Ada project. But Ada in itself was far ahead of the competition. E.g : Discriminent records existed long before other languages considered “optional”s. (The quora thread is interesting, although opinions are a bit dated : compiler is the first tier for Ada code checking, linter exists in the form of compiler + libadalang, language has a 2012 standard and a 2015 coming, formal proofs tool exists (SPARK)…
Answers.UserDisplayName: LoneWanderer
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-05T00:38:36.447Z
Answers.Text: @LoneWanderer - one thing I always considered unique and innovative: tasks were first class types that could be _members of packages_ with decent semantics defined for that ownership relationship.  Contrast with nearly all languages today for which tasks (i.e., threads) are merely the thinnest possible wrapper over an OS construct and you're own your own w.r.t. all thread operation semantic.
Answers.UserDisplayName: davidbak
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-05T17:02:40.653Z
Answers.Text: One issue with Ada was that the compiler would not fit on a PC.  I reviewed an implementation that came with its own 4MB expansion card and the software only worked with that specific card (this was before "DOS Extenders").  I recall complaints (from mainstream implementations) that compiling and linking was ridiculously slow.  Of course, C++ (that is, the Cfront implementation) would not fit on a PC either.
Answers.UserDisplayName: JDługosz
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-05T17:06:48.933Z
Answers.Text: Re _But Ada in itself was far ahead of the competition._  I got the impression that Ada missed the boat.  The Object Oriented _paradigm shift_ had started, and a design decision was that Ada was fundamentally unable to do run-time polymorphism.  The philosophy was that once some code was done and tested, nothing else in the program should be able to alter that behavior.  So, no pointers to functions: any such choice had to be a fixed `case` statement listing all the possibilities up front.  BTW, discriminated records are in Worth's Pascal.
Answers.UserDisplayName: JDługosz
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-05T19:45:35.457Z
Answers.Text: @JDługosz It doesn't seem to have mattered in the end, since most developers never grokked OOP, and later generations [hate it](https://thenewstack.io/why-are-so-many-developers-hating-on-object-oriented-programming/) because they [never saw it used properly](http://nomad.uk.net/articles/developers-who-hate-on-oop-don't-know-how-to-use-it.html). We watched the same thing unfold with checked exceptions.
Answers.UserDisplayName: Tech Inquisitor
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-15T04:38:35.263Z
Answers.Text: Wonder what the world would have looked like if Microsoft had made Ada.Net.
Answers.UserDisplayName: Thorbjørn Ravn Andersen
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T02:12:11.860Z
Answers.LastActivityDate: 2022-01-05T20:51:59.047Z
Answers.LastEditDate: 2022-01-05T20:51:59.047Z
Answers.UserDisplayName: John Omielan
Answers.Body: <blockquote>
  <p>One language is better.</p>
  </blockquote>
  <p>Sure, and if you ask five people <em>which</em> one language is best, you'll get six answers.</p>
  <p>Computer programming is not a solved problem. We're still learning the best ways to do it. Some languages are better suited for certain tasks, but there's also plenty of room for differences of opinion even with a single well-defined problem domain.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-07T22:58:34.650Z
Answers.Text: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/132992/discussion-on-answer-by-hobbs-why-isnt-there-one-language-to-use-instead-of-dif).
Answers.UserDisplayName: Ben I.
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-04T08:15:09.910Z
Answers.LastActivityDate: 2022-01-04T08:15:09.910Z
Answers.UserDisplayName: hobbs
Answers.Body: <p>Imagine you open a carpenter's toolbox and you see</p>
  <ul>
  <li>a hammer and some nails</li>
  <li>a screwdriver and some screws</li>
  <li>a bottle of glue</li>
  </ul>
  <p>You are incredulous. All three of these things are used for joining two pieces of wood together.  Why in the heck would the carpenter carry around <em>three</em> different things that all do the same job?  Why would he learn how to use all three tools, when he could learn just one?</p>
  <p>Of course, the answer is that some tools are good for some jobs, but bad for others.  In some situations, glue works great but nails and screws would not.  Other situations, glue is horrible, screws are great, and nails would okay. For some jobs, all three might work equally well.</p>
  <p>It's the same with programming languages. For some jobs, this language is great but that language is horrible.  For others it is the opposite.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T20:11:48.540Z
Answers.Text: 3 tools, Ok. 300 though? Once you have the basic useful ways to solve a problem, why create more ways? I wonder why we are still creating more languages? Architecture pretty much stopped with the advent of steel framing and reinforced concrete, 100 years ago. What do they know about solving problems that we don't?
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T21:52:24.253Z
Answers.Text: @ScottRowe I think you answered your own question.  Computer hardware is continuing to evolve, so there are now problems to be solved that did not even exist when older languages were designed.  For example, in the 1960s most input/output was on punched cards.  Nobody had screens or keyboards.  "User interface" was not even a thing that languages tried to address.  When the fancy new-fangled "command line interface" was introduced, languages came along to make use of it, then later GUIs,  etc.
Answers.UserDisplayName: Daniel K
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T22:26:38.617Z
Answers.Text: @ScottRowe it's like saying "once you have three fields of mathematics, why create more fields?". it's like saying "once you have civil engineering, mechanical engineering, and architecture, why do other engineering disciplines exist?". the short answer is, there are more goals here than just "if it's strong enough it's good enough". especially considering (using an architecture analogy because why not) the building will need to periodically change to incorporate new features, so the (complicated) plans will have to be easy to understand
Answers.UserDisplayName: somebody
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-04T03:13:32.783Z
Answers.Text: @somebody At a more fundamental level: when I was a student the two metrics that an algorithm would/should optimize were space and time. Come phones and a third more crucial appears : battery-life!!
Answers.UserDisplayName: Rushi
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-04T03:34:33.617Z
Answers.Text: A funny version just saw of world changing : I asked my daughter to hand me the phone book.  She laughed at me, called me a dinosaur and handed me her iphone. So the spider is dead, the iPhone is broken and daughter furious
Answers.UserDisplayName: Rushi
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-04T11:34:02.047Z
Answers.Text: @Rusi for a moment I thought that you meant you had damaged a web crawler. What did people often use the Sears catalog for 100 years ago? Don't try that with your phone! xkcd.com/2212/
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-04T16:41:08.910Z
Answers.Text: @ScottRowe So it took some 10000 years to (dubiously) completely solve architecture? Great, only about 9900 years to go for computer architecture!
Answers.UserDisplayName: 8bittree
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-05T12:42:43.017Z
Answers.Text: @ScottRowe Have you ever seen how many different types of screw there are? Or even just how many different [types of screw _head_](https://en.wikipedia.org/wiki/List_of_screw_drives)? Phillips introduced crosspoint drive; Pozidriv brought further improvements; then there's JIS B 1012, Supadrive, Phillips II, Frearson, French recess, Motorq… and that's before we get onto the square ones, hex, pentalobes, hexalobes, combinations, external drives, and _then_ all the security screws designed specifically to be incompatible with everything else… Carpentry may be a better example than it seemed :-)
Answers.UserDisplayName: gidds
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-14T21:29:29.700Z
Answers.Text: @ScottRowe Your assumption that we have found the optimal way of expressing how to instruct a computer to do things, is probably not holding up.  We are still trying to figure out how to write short, elegant stuff that actually work _and_ scale.
Answers.UserDisplayName: Thorbjørn Ravn Andersen
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-15T00:25:17.670Z
Answers.Text: @ThorbjørnRavnAndersen I agree that it is a complex field, but I have seen and created a lot of 'simple' ways to solve particular problems. Usually they are too limited or are not widely used. Complex methods are great once you are an expert, but hard to learn and still have vexing hidden pitfalls. I suppose I should have taken aim at the overly elaborate and optimistic requirements and expectations instead? Make the problem simpler first. In a previous job, we used to tell the Sales people to learn to say No. Let someone else say Yes and wade in to the tar pit :-)
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-15T04:35:49.910Z
Answers.Text: @ScottRowe in my experience, if something allows a simple solution it is because somebody did a lot of work allowing it to be simple.  Excel is a good example of an environment allowing you to create quick and simple solutions for a data based problem.  The amount of work gone into excel is staggering.
Answers.UserDisplayName: Thorbjørn Ravn Andersen
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-15T16:56:58.107Z
Answers.Text: @ThorbjørnRavnAndersen Excel was said to be the most used application in the world. I do agree that it is amazing and so is the level of effort for, what, almost 40 years? This tablet browser gives me fits though! :-)
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-15T21:18:22.227Z
Answers.Text: @ScottRowe  Yes.  Why would you need anything else?
Answers.UserDisplayName: Thorbjørn Ravn Andersen
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T16:17:21.867Z
Answers.LastActivityDate: 2022-01-05T12:20:38.817Z
Answers.LastEditDate: 2022-01-05T12:20:38.817Z
Answers.UserDisplayName: Daniel K
Answers.Body: <p>This is a CS variant of the Sapir-Worff hypothesis: your world view is shaped by your language. Different programming languages make you think in different ways, and are suitable for different purposes. In CS terminology, there are different &quot;paradigms&quot;. Some languages are imperative, some declarative. There are functional and logic languages. And they all make you think just a little differently.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T00:06:12.740Z
Answers.Text: Maybe we should decide what we want to achieve before we pick up the tools? Then choose the tool that makes it easier for us. Why are people being shaped by what they learn? I thought that the point of education was to learn to think for yourself.
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T00:30:52.533Z
Answers.Text: Or, put the other way, there are different ways that it is useful for programmers to think, and different languages are better for writing those thoughts in.
Answers.UserDisplayName: kaya3
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T22:16:25.843Z
Answers.Text: @ScottRowe because it's extremely hard to figure out what language you *really* want - there are an awful lot of languages out there, and chances are, a better one is just not as popular - hence you won't find it, let alone use it. also, a) it's a lot easier to use a language you already know than it is to learn a new one (potentially risking much frustration, encountering shortcomings etc.) and b) sometimes a project needs to be worked on by several people, some of whom just don't have the time to learn a new language (esp. fluently enough to write good programs with it)
Answers.UserDisplayName: somebody
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-04T00:55:12.097Z
Answers.Text: @somebody the problems you mention exist because there are so many languages. It's the same with spoken and written language: we would be better off with just 2 (French is so good for swearing, someone said).
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-04T05:22:21.873Z
Answers.Text: @somebody you're spelling out the [blub paradox](http://www.paulgraham.com/avg.html) : viz the languages you'll likely consider are minor variations of your known-set. For the significant game changer (a) you would not know of it (as you point out) Or (b) you would know of it merely as a name Or (c) you will study it as a strange and convoluted way of replicating your familiar set, **never really getting why on earth anyone does that changeover.** As the saying goes: You can write FORTRAN programs in any language 
Answers.UserDisplayName: Rushi
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-05T00:51:31.817Z
Answers.Text: *"there are an awful lot of languages out there, and chances are, a better one is just not as popular"* - on the other hand, the less popular a language is, the less *useful* it is, because unpopular languages don't have as good third-party libraries, support, or learning resources. So even if you insist on learning *the most useful* language rather than just a language which is good enough for your purposes, you don't have to consider literally every language ever designed; you don't even need to consider languages below a certain popularity unless there is a strong reason for a specific use.
Answers.UserDisplayName: kaya3
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-16T14:32:04.860Z
Answers.Text: @kaya3 the devil is in the phrase “better language”. There might be technical or political reasons for a given language to be better than another.  I’ve been in a situation where Perl was the best option for business critical high performance code and in others where Java was the _only_ option for solving a problem across a complex network. Thankfully docker and kubernetes lessen the pain.
Answers.UserDisplayName: Thorbjørn Ravn Andersen
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-16T14:33:59.593Z
Answers.Text: And I agree that the languages you know influence the way you think.  If you know Prolog and Lisp and Haskell you have more tools in your box
Answers.UserDisplayName: Thorbjørn Ravn Andersen
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-02T20:34:08.510Z
Answers.LastActivityDate: 2022-01-02T20:34:08.510Z
Answers.UserDisplayName: Victor Eijkhout
Answers.Body: <p>Really, when making your own language is something people or companies <em>can</em> do, it's almost the default for that to start to occur.</p>
  <p>Let's say there <em>was</em> just one language everyone used, or perhaps a couple of them to cover all the different paradigms. Chances are, not everybody's going to like parts of it. Maybe some aspect of the syntax seems weird to some users, or it's not fast enough, or it's not as portable as people wish it was. So, what happens? Someone makes a new one, quite possibly just an incremental improvement on the one they were using before (think C++, Kotlin, or Typescript).</p>
  <p>A programming language will never be &quot;one size fits all&quot;. People from different backgrounds, like C, Python, or Haskell, will find different syntax more intuitive, and will have different needs and expectations for what a language provides (e.g., garbage collection, first class functions, a large standard library, and so on). The natural result of this is more languages being made.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T00:10:26.710Z
Answers.Text: Anyone can create a Domain Specific Language to solve a particular problem, I have done that several times. I didn't expect anyone else to want to use it though.
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T01:35:46.120Z
Answers.Text: @ScottRowe I'm talking more about general purpose languages, but yeah there's bound to be zillions of languages used personally/within companies, or made [for fun](http://esolangs.org/wiki/Main_Page).
Answers.UserDisplayName: rydwolf
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-02T23:58:53.140Z
Answers.LastActivityDate: 2022-01-02T23:58:53.140Z
Answers.UserDisplayName: rydwolf
Answers.Body: <p><em>The Title of your post, and the content are two very different questions!</em></p>
  <h2>Should you learn just one language?</h2>
  <p>I want to say initially <strong>yes</strong>, but ultimately you may need to learn a number of languages in your career if you want to develop on or for the latest hardware and operating systems as they evolve.</p>
  <p>The programming language is really just syntax for compiler instructions. After you gain proficiency in a language you will hopefully gain an appreciation and understanding for how that language works, if not why it works. Different languages are written for different compilers, once you understand one language then picking up another language can be much simpler if you understand how the new language syntax structure relates to the language you are proficient in. So once you gain proficiency in one language, transferring to another should be much lower effort.</p>
  <p>The counter argument to this is that it takes a lot of practise and therefor a long time to gain proficiency in one language. Instead by learning and using multiple languages at the same time, you can pickup the similarities and differences quicker and may gain a better understanding of computer science concepts in general because you will more practised at differentiating between language and concept.</p>
  <p>From a formal education point of view, it becomes <em>practical</em> from a tooling/teaching/resource perspective for institutions to streamline the teaching of many different concepts into using the same language. You want to minimise the time and effort it takes to get your learning and development environments up and running. If you reduce the language and environment options you can reduce the documentation and guidance that you may need to provide but you can also maximise the returns on pre-requisite knowledge across subjects/units.</p>
  <p>What is important to the institution is that the language(s) adopted are capable of providing relatable examples to cover key CS concepts and methodologies and that they can find instructors proficient enough to deliver the necessary content. Many of these practical concepts will drive the language selection and therefor the natural bias of that next cohort of students, which can further skew this conversation...</p>
  <h2>Why there isn't a single language?</h2>
  <p>Whilst one <em>perfect</em> language might be a great idea, there are a lot of different competing opinions around what that <em>perfect</em> language might be, <a href="https://en.wikipedia.org/wiki/Turing_completeness" rel="nofollow noreferrer">Turing Completeness</a>, though well accepted and established, is still just a theory and one of many opinions especially on how to very that the language is complete. ;)</p>
  <p>Before we try to create one <em>new</em> and <em>perfect</em> language, we would seek to find a way to incorporate some, if not all of the previous popular algorithms and abstractions that make each of the current languages <em>great</em>. But can such a thing be done, who would be responsible for re-writing the code from existing frameworks and languages, how do we determine which to bring across, who can be trusted to verify the completeness of this language?</p>
  <p>There are many <em>general purpose</em> programming languages that have been created in the past, and I'm sure we haven't seen the last of them. Typescript is an interesting example specifically of a higher order language that compiles into a lower order language <em>javascript</em> for execution in web browsers, we will probably see more of this type of evolution in the future because it deosn't require any additional effort from hardware or OS vendors. There are many theoretical benfits that TypeScript offers over javascript, I think we all agree that TypeScript has its place, but in a simple HTML page I can quickly use Javascript to satisfy many requirements it will run effectively natively in the browser without needing further compilation.</p>
  <p>What tends to rule the discussion is effort in the form of Time. Time is money, if I can use something to achieve an outcome quicker than other options, then using it might make me more money. So I will consider it.</p>
  <p><a href="https://cseducators.stackexchange.com/a/7187">@Buffy raises some excellently phrased points</a> but we need to recognise that programming languages are bound to commercial interests, whether that be the IDE, a storage or hosting platform or client end runtime framework or platform. As developers we are constantly fighting between what is theoretically &quot;best&quot; and what is a commercially viable or practical language for development for our particular client.</p>
  <p>The hardware or environments that code is deployed to can restrict the possible languages which will significantly contribute to the total cost of designing a solution. So regardless of our experience or language proficiency, we may come across a client that whose solution must be deployed to a very specific hardware or medium or that client may have their own</p>
  <p>Some hardware vendors have specifically designed their own languages either in an effort to protect their hardware or implementation IP or sometimes hardware/vendor providers are deliberately trying to create separate market verticals, sometimes driven from a greed/commercialisation point of view or sometimes as a deliberate legal avoidance technique.</p>
  <blockquote>
  <p>Java was supposed to be the <em>killer</em> all purpose language, <em>MS Developer Studio</em> and early versions of <em>MS Visual Studio</em> even included support for variants of java (j++, j#). The variations were an evolution of the original java, enhancements to increase developer productivity and in part driven so they could integrate the complied assemblies with Internet Explorer to avoid some trust and operational constraints that were enforced from the official JVM runtime specification.</p>
  <p>Even before official complaints, MS were working on C# as a Java replacement that they could support and package directly in their operating system and browser products without being dependant on the language and JVM specification controlled by a competing commercial provider. MS were sued by Sun Microsystems because the MS java implementation was not 100% compatible with the java specification and as part of the settlement java support was dropped before the release of Visual Studio .Net.</p>
  </blockquote>
  <p>To properly answer the <em>why</em> we have multiple general use languages in the first place it might be helpful to talk to someone who has experience authoring multiple languages, <a href="https://microsoft.fandom.com/wiki/Anders_Hejlsberg" rel="nofollow noreferrer">Mr. Anders Hejlsberg</a> comes to mind as co-designer to many general purpose languages including <em>Turbo-Pascal</em> which replaced a previous general purpose language <em>Pascal</em>, <em>Delphi</em> and of course more recently <em>C#</em> and <em>TypeScript</em>.</p>
  <p>What I appreciate about Hejlsberg's designs is that he does not just focus on the language itself but he strikes a pragmatic balance between all stakeholders including the complier and interpreters. He puts a lot of energy into ensuring the tools, documentation and support libraries are provided and maintained to keep the language commercially viable.</p>
  <p>His engineering work is sometimes criticised as being in part derivative of other languages or attempts, but how many of us have truely original thoughts anyway? Hejlsberg applies an iterative approach as he continues to find ways to improve developer productivity.</p>
  <p>What is interesting is that changing hardware technologies and costs over the years means that what we want and expect from computers is evolving. As tech evolves some software driven algorithms get packaged into or replaced by hardware implementations, and some hardware implementations become more cost or energy efficient to be implemented in software. This means that the languages need to evolve to cater for these changes, over time you reach a point where there is no easy way to add a new fundamental extension to your language without contradicting,  de-stabilising or rewriting all the previous rules and regulations. At that point, the next version, even if it has the same name or similar syntax, is probably a new language of its own.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-04T11:27:56.487Z
Answers.Text: This is a well thought out answer!
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-05T15:37:34.537Z
Answers.Text: Your history of Microsoft's Java work is somewhat distorted. Java hit the development world by storm in the mid-1990s and Microsoft joined in. By the time Sun sued Microsoft, the Microsoft JVM was significantly faster than Sun's (and may have been the fastest), it was the most used JVM in the world, and by some accounts, the most compliant to the spec (but, because Sun controlled the the testing process, they never showed MSFT's compliance numbers).  Microsoft extended Java in order to make it interop with Microsoft's existing technologies and they didn't implement JNI - that was the complaint
Answers.UserDisplayName: Flydog57
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-06T03:53:41.253Z
Answers.Text: I learnt Java at Uni and was pro Java for a long time because the MSFT JVM was incredibly good. We all sense that Sun were worried about how MSFT were going to commercialise or profit from Java, especially with Visual Studio's growing popularity as an IDE. But the reason cited in the litigation was simply that MSFT compiled java and their JVM was not 100% compatible with Suns, so I wanted first to highlight how a legal confrontation between heavy weights was a contributing factor to how a really good candidate for a ubiquitous general-purpose language became superseded by another.
Answers.UserDisplayName: Chris Schaller
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-06T04:12:39.817Z
Answers.Text: @Flydog57 It is telling that the direct reason JVM, Java and variants were removed from Visual Studio was specifically part of the settlement with Sun, not as a derivative of the litigation, they were specifically told to remove it. I think the final nail in the coffin with the MS JVM was an anti-trust suit against it being distributed with IE but I can't find any   good references to back this up. (I have toned down my criticisms in the post, was not intentional)
Answers.UserDisplayName: Chris Schaller
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-06T04:45:24.193Z
Answers.Text: @chris: it was in all the papers: https://www.cnet.com/news/sun-microsoft-settle-java-suit/. Sun's argument was that Microsoft's JVM wasn't compatible with the standard. Sun's advantage was they were the adjudicators of compatibility. Published independent reports showed that the MSFT JVM was as compatible as Sun's (IIRC) - except for the absence of JNI. Microsoft swapped in a COM & native Windows interop mechanism (using the standard `@` notation) to replace JNI. Sun somehow argued that no-JNI broke "write once, run anywhere". Note, by the time of the settlement, I was fulltime at Microsoft.
Answers.UserDisplayName: Flydog57
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-06T07:13:46.547Z
Answers.Text: Thanks @Flydog57 that's a good link and summary and pretty much what I was trying to paraphrase from a conceptual viewpoint, I just tried to dumb it down a bit, the details are not important to this discussion, just the fact that legalities around commercial interests are a very real aspect of the evolution of programing languages, even when the theory or conceptual ideas are sound, the practical implementation of a languages in a commercial environment mean we will probably never have one single ubiquitous language.
Answers.UserDisplayName: Chris Schaller
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-04T06:49:37.850Z
Answers.LastActivityDate: 2022-01-06T04:07:30.140Z
Answers.LastEditDate: 2022-01-06T04:07:30.140Z
Answers.UserDisplayName: Chris Schaller
Answers.Body: <p>One more aspect:</p>
  <p>Every non-trivial software project uses its own, problem-specific language. So, there's literally millions of programming languages in use.</p>
  <p>How that?</p>
  <p>Bigger software projects always consist of multiple layers, where the lower-level (library) functions help to make the higher-level ones easier to write and understand.</p>
  <p>Designing software in layers effectively means to create (in the lower layer) the vocabulary you want to use in the next-higher layer, thus <strong>creating the language you want to use for expressing your solution</strong>.</p>
  <p>So, in a way, there are no two programs using the same language, as they all introduce lots of problem-specific vocabulary.</p>
  <p>With bigger software projects, knowing the base programming language (like C, Python or Java) is by far the less challenging task. Understanding the problem-specific vocabulary (classes, fields, methods, ...) plays a much greater role.</p>
  <p>So, why do we still have different base languages? Because we choose a language where the base concepts plus the available libraries provide a reasonably-good match to the problem-domain, so we don't waste precious resources on creating abstractions that would come for free with a different base language.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-04T14:55:14.330Z
Answers.Text:  Ppl familiar with the ideas of Paul Graham's [On lisp](https://en.m.wikipedia.org/wiki/On_Lisp) will recognize how true is your observation.  One can (and as you say must for large enough systems) build the domain specific language in C, Python, C++ or what ever. Only lisp makes it pleasant and trivial
Answers.UserDisplayName: Rushi
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-05T10:04:06.500Z
Answers.Text: @Rusi In fact, I've been using Common LISP as my main language from around 1987 till 2003 (switched mainly to Java afterwards), and it has deeply influenced my way of developing software.
Answers.UserDisplayName: Ralf Kleberhoff
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-05T11:41:37.833Z
Answers.Text: Interesting about domains and language. We humans seem to get stuck on defining nouns and verbs, but what is more important is *what you are talking about*. Data is important, code and language not.
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-05T14:30:27.607Z
Answers.Text: Heh! One lisper smells out another . I can hardly remember as much pleasure as Scheme gave me in the 80s. Ok a tie with Basic. And C close behind. It's strange how clueless the paradigm-pundits are about the sheer joy that a beautiful language can give. Oh, and the largest C I've written is a lisp implementation ... For which I would pore over the Steele common lisp bible. No and I did not come close to implementing CL 
Answers.UserDisplayName: Rushi
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-15T00:32:17.477Z
Answers.Text: Object Oriented Programming Systems (Oops!) make this idea of a custom hammer for every nail more explicit. Many people say it is an unhelpful approach, but many say it is indispensable. I guess it depends on how good you are at using (and selectively not using) the technique.
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-04T14:39:26.163Z
Answers.LastActivityDate: 2022-01-04T14:39:26.163Z
Answers.UserDisplayName: Ralf Kleberhoff
Answers.Body: <p>In many companies you standardize on one or a few languages. This saves a lot of time and effort and basically makes the whole operation more efficient. In the company you can have a &quot;dictator&quot; deciding on how to work (well not actually a dictator, but might be called software architect or similar).</p>
  <p>But you cannot order other people or other companies to use the same language. The US military tried with the language Ada, but failed to impose the usage of it on everyone. Ada is sadly just about dead now, sadly because it was/is a really good language and could have replaced all of C, C++, Fortran and Cobol and some other languages as well.</p>
  <p>One driving factor for using several languages is what type of program you are writing and where it will run and the restrictions this sets for your choice. For a very common type of application today, a web application, the programming often falls inte three different parts and then three different languages. As example, see a largish web shop (say, <a href="http://www.thomann.de" rel="nofollow noreferrer">www.thomann.de</a> )</p>
  <ul>
  <li>One part of the application runs in you web browser: say Edge or Firefox or Safari. Today the only computer language they support is javascript. (They use the languages HTML and CSS as well, but these are not general purpose computer languages, more like document specifications).</li>
  <li>The second part of your application runs on the computer server. Part is a standard web server (often Apache or IIS which you simply install as a function in your server). But the actual functionality you program in some language. It could be javascript (perhaps using nodeJS) or from a large choice of languages. Javascript is not very common from a number of reasons, you will probably find a mix of other languages used: Perl (early days of internet), PHP, Ruby (very good for some things), Erlang (very good for some things), C/C++ (good for some things). Often you knit together various components and frameworks in order to save developer time and get higher quality at a lower cost.</li>
  <li>The third part of your application is often a database. Databases, especially when you have millions of customers and orders and product and so on, are often accessed using a program language called SQL. There is not much choice for you there as that is what databases uses (there are alternatives of course, but not in quite as widespread usage). SQL is great for accessing databases but totally useless if you try to run in the web browser (simply will not work).</li>
  </ul>
  <p>Could you even create one language for all different usages? Personally I say no! And even if someone did, a few years down the line people and companies would create and select other languages.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-04T11:25:16.230Z
Answers.Text: My mother used to say that the best form of government is a benevolent dictatorship. Kind of like saying one time pad is the best 'encryption' method, this is indisputable, but not too practical also. But, some dictation in the form of standards and accepted methods would be beneficial just about now.
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-05T14:17:54.700Z
Answers.Text: “Today the only computer language they support is javascript.” –And WebAssembly. Which is of course almost never written directly by humans. And even JavaScript is often not written in JavaScript, but in another language that compiles to JavaScript. What _is_ possible though is to write both front- and backend code in e.g. Rust, Go or Haskell and compile the backend to server-native machine code and the front end to WebAssembly.
Answers.UserDisplayName: leftaroundabout
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-03T23:07:05.497Z
Answers.LastActivityDate: 2022-01-04T07:36:30.020Z
Answers.LastEditDate: 2022-01-04T07:36:30.020Z
Answers.UserDisplayName: ghellquist
Answers.Body: <p><a href="https://cseducators.stackexchange.com/a/7189/3168">Buffy and Ben</a> offer logical explanations to the plethora of languages that exist.  The ideas make sense, you need a better tool, you have a different niche. But languages don't exist solely because they work better than another language for a specific use case. There's a human element in there that makes things a whole lot less fun and a whole lot more arbitrary.</p>
  <p>For example, the list of languages Ben had, each are not the ideal language for their own use case, or exist in spite of other languages for not very nice reasons.</p>
  <h3>Excel</h3>
  <p>Excel's language is not the best for &quot;short scripts&quot; and is severely limiting compared to many dozens of languages, including python. For example, instead of having to execute statements hidden behind visual cells, it might make more sense to have a series of statements that refer to specific cells ie:</p>
  <p>suming an entire row.</p>
  <pre><code>cell[row][col] = sum(cell[row][:])
  </code></pre>
  <p>or sum an entire square subsection:</p>
  <pre><code>cell[row][col] = sum(cell[row_start:row_end][col_start:col_end])
  </code></pre>
  <p>If you want to do something like simple sum rows in a table if they meet a condition, that's near <a href="https://stackoverflow.com/questions/65508264/excel-how-to-sum-rows-in-table-a-if-they-meet-a-condition-in-table-b">incomprehensible</a> in Excel's programming language:</p>
  <pre><code>=SUMPRODUCT((ISNUMBER(FIND(UPPER(&quot;(&quot;&amp;O<span class="math-container">$5:O$</span>9&amp;&quot;)&quot;),B5)))*I<span class="math-container">$5:N$</span>9)
  </code></pre>
  <p>So clearly Excel's language is not the easiest or best choice for such a thing.</p>
  <p>The real reason Excel's language exists is because it already existed.  Here's what I mean.  The average users use case of Excel doesn't even include using the programming language directly, much less these summing routines.  Using a better language doesn't make a lot of <em>business</em> sense, since it's relatively niche in the first place.  What's more, if you change to an objectively better language for the job, you've also alienated your pre-existing customer base, many of which will be angry and stubborn attempting to stick to their inferior product, since they don't want to learn.  You may be stuck supporting the &quot;old way&quot; regardless because of stubborn customers.</p>
  <h3>C</h3>
  <p>If we get to C, C doesn't exist because it is the best language for working with low level hardware/telling the hardware what to do.  C doesn't even map properly to large swaths of different devices it's used on, it can't encapsulate ideas of paged ram that many pieces of hardware have (where you can't address pieces of memory directly, you must first execute a function to be able to address a place where a piece of memory resides).  C often does extra work as well, because it doesn't have many compile time constructs, so you're often doing work at runtime that could be done at compile time, or using <em>another</em> language to generate C code which represents your compile time construct.  C++, when you can use it, is objectively a better language for &quot;mapping to hardware&quot;, it is a 99.999% superset of C and can do things faster, easier, and less error prone.  But languages like Rust, are even better than that, as most functionality and many libraries are still available even after you remove the standard library.</p>
  <p>C is used because it already exists, and has a stable ABI.  Now that ABI thing might sound like a &quot;neat programming language feature&quot;, but really, it's another political thing. ABI, application binary interface, refers to how compiled programs interact with other compiled programs, calling functions from the assembly level in your code. If ABI's aren't stable, new versions of a language or compiler might cause previously working code, that was linked during runtime to another library, to no longer work. An ABI becomes stable when compilers agree not to change it.  The only reason C's ABI is stable is people agreed not to change it.  It's not because C is an elegantly written language, it's because people used it.</p>
  <p>C's niche today is for glue code because of it's ABI stability. Lots of other languages know how to talk with compiled C code because of this. C, because of its ubiquity, and how old it is, is supported by a wide variety of hardware.  This makes it convenient when targeting low level code for the widest set of devices, but it isn't a feature of the language that made it so.  Often it is used to boostrap OS's and programming languages because of this.  Some platforms don't support C++ and rust because no one's bothered to write implimentations for those platforms for those languages.  These languages are &quot;more complicated&quot; thus often it means that these other platforms don't want to put in the work to support them.  But for C++ and Rust implementations relying on LLVM, or other 3rd party IR tooling, it's not because of the language at all, it's because the vendors don't feel like putting in the support for LLVM targets.</p>
  <h3>Mathematica</h3>
  <p>Mathematica is not a nice language to use for most programmers.  It's really inefficient and the tooling ecosystem is entirely tied to wolfram products. It's not pleasant to use, and only appears &quot;great&quot; to a mathematician, because mathematicians don't want to learn programming languages, so you have to trick them into using the tools they actually need to use.  There are some nice visual features, unrelated to the language itself, but as we see with python notebooks, this can be accomplished in basically any language if someone put forth the effort. So that's not a positive for the language itself.  Mathematic symboligy is chronically overloaded to the point where even simple symbols, like the delta, can be confused within the same function for a multitude of different usages.  Mathematic symboligy is not efficient for understanding with that respect. Some one wise once said:</p>
  <blockquote>
  <p>&quot;[Mathematic] equations are like code golf you're forced to read&quot;.</p>
  </blockquote>
  <p>The purpose of Mathematic symboligy is unfortunately not to for reading, but for easy writing and an &quot;objective&quot; symbolic set across language barriers. These equations are often written write and forget.</p>
  <p>Now others might tout mathematica's symbolic math power, and other utilities.  The problem with this is that this isn't due to the language itself, but the libraries <em>linked behind it</em>.  I emphasize linked, because you don't even write actual symbolic evaluation utilities in Mathematica itself, they wrote that in an entirely different language, and give you a simple interface to those utilities. If that doesn't speak to how bad the language is for it's own use case, I'm not sure what does.  Unfortunately many of these implementations are non trivial, and the only thing that arguably rivals it, sympy, gets stuck with trivial symbolic equations. On top of that, because Mathematica is paid, they don't opensource these things, so better languages and ecosystems can't take advantage of the work they did on their inferior language.</p>
  <h3>The myth that languages don't try to rule them all.</h3>
  <p>So one more thing I'd like to point out, there <em>are</em> attempts to have &quot;one language&quot; languages, many languages have &quot;converged&quot; to have so many utilities that they serve extremely broad niches.  One of the most famous and oldest examples, was Algol 60. It was supposed to be the successor to previous versions of Algol, and included a whole bunch of other programming paradigms inside of it. IIRC, it didn't have a successful compiler implemented for it, it was too big.</p>
  <p>But other languages have followed in its footsteps. C++ being a very very reminiscent example. C++ has expanded to include functional paradigms, imperative declarative.  C++ has expanded to attempt to <em>actually</em> fill all possible niches, from low to high.  Now, ignoring arguments of how well it's actually managed to do these kinds of things, C++ has basically run into the algol situation, as of C++20.  C++20, in 2022, does not have a complete implementation. 2+years after the finalization of the standard, there's no compiler that supports <em>everything</em> in c++20.</p>
  <p>But another thing I'd like to mention, is metaprogramming.  A very popular proposal to C++ would have added <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0707r4.pdf" rel="nofollow noreferrer">MetaClasses</a> to the language, a facility that would have brought, implicitly many of the facilities found in C#/Java OOP, properties and many other features.  I bring this up to bring up the tendency for large updated programming languages to have features meant to implement other features. Features that overlap heavily into what were the niches of other programming languages.  C++ is not alone in this.  In swift you can overload any operator, and it similarly has a powerful meta programming capability.  In Python, you can modify the AST of the language itself at runtime, allowing you to implement powerful language extensions with out new compiler extensions or other advanced tools.  In Rust, despite implementations of it being compiled, you can use macros to emulate almost every feature imaginable, though it will often slow compile time, as macros in rust work off of the abstract syntax tree.</p>
  <p>And there's often good reason for people not wanting to jump ship to another DSL for certain workloads. Each of the languages I've discussed, each has their own downsides their own major faults maybe acceptable to a select few people, but not acceptable to everyone.  So people wish to stick to their own languages for all these facilities, and develop language features that enable them to do this.  Tooling comes packed in with their own language already, and they don't have to worry about odd build system interactions either.</p>
  <h3>Don't get me wrong, separate languages are still valuable.</h3>
  <p>While there is a push in many large popular languages to be able to fill virtually every niche, there's still value to DSLs.  A really good example of this, and probably the only really good example of this, is SQL.  While SQL has a lot of dialects, SQL is independently compiled from your host program running the queries, and is very small, and allows you to more easily construct database queries and actions vs most native general purpose programming language.</p>
  <p>Now there are funnily enough a few issues with this view still, many programming languages <em>embedd SQL syntax into themselves</em>.  C and C++ have tools that do this, Rust has libraries that have macros that sort of do this.  Still the spirit of a DSL is still there.</p>
  <p>The other major issue is that SQL itself is... bad for a query language.  In another example of not-the-best-tool being in use because people use it, SQL, and most of its modifications and derivatives, are arguable outclassed by <a href="https://en.wikipedia.org/wiki/Datalog" rel="nofollow noreferrer">Datalog</a>, an modification to a language called prolog which was never meant to be a data base query language.  That's pretty sad.  One of the major culprits of the failures of SQL were the original designers at IBM of the language... who instead of using pre-defined <a href="https://en.wikipedia.org/wiki/Relational_algebra#:%7E:text=In%20database%20theory%2C%20relational%20algebra,and%20defining%20queries%20on%20it.&amp;text=The%20main%20premise%20of%20the,relations%20to%20an%20output%20relation." rel="nofollow noreferrer">relational algebra</a> and <a href="https://en.wikipedia.org/wiki/Relational_calculus#:%7E:text=The%20relational%20calculus%20consists%20of,way%20to%20specify%20database%20queries." rel="nofollow noreferrer">relational calculus</a>, formal mathematical models which had been in use for decades prior and unlike other &quot;mathematical models&quot; are much <em>simpler</em> than than what we practically use today, decided to just... not use them...</p>
  <h3>TLDR</h3>
  <ul>
  <li>There's a big &quot;i'm used to it&quot; human factor to why some different languages exist, beyond and sometimes eclipsing the &quot;fills a niche&quot; argument.</li>
  <li>The best language for a job is often not the most popular language for a job.</li>
  <li>Languages may exist or be popular regardless if the language on its own merits is worth anything.</li>
  <li>languages have large amounts of libraries nobody bothered to make elsewhere will often get them used above others.</li>
  <li>languages are already established so people used them which causes people to use them more.</li>
  <li>Tools (debuggers, linters, editors, package managers, builders etc...) matter, take time, and compound the previous statement regardless of how good a programming language is.</li>
  <li>Some languages do actually try to do everything (C++, Algol 60, Python, Swift, etc...), in particular lower level languages often are able to find themselves able to embed zero cost abstractions that make them appear much higher level (iterators, static garbage collection, ownership), add features from different programming domains (functional, executors/declarative) which end up expanding to other programming languages domains.</li>
  </ul>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-05T23:31:36.677Z
Answers.Text: Gosh, you stumped me: I can't think of a witty comment for this long Answer!
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-05T20:01:26.943Z
Answers.LastActivityDate: 2022-01-05T20:01:26.943Z
Answers.UserDisplayName: Krupip
Answers.Body: <p>There are a lot of great answers here which explain why it's <em>good</em> that there are so many different programming languages. But that's not exactly what you asked; you want to know why there <em>are</em> so many different programming languages.</p>
  <p>I think the answer to that is quite straightforward: programming languages are not actually that hard to create, and when somebody designs a new programming language, they aren't thinking &quot;I want there to be more programming languages&quot;, they are usually thinking &quot;I want there to be <em>a</em> language <em>like this</em>&quot;. Besides the motivation to design an &quot;ideal&quot; programming language without the drawbacks and blemishes of earlier languages (in the language designer's subjective opinion, which of course differs from every other language designer's subjective opinion), it is actually quite fun to design a programming language.</p>
  <p>Sometimes a programming language exists simply because someone had <a href="https://en.wikipedia.org/wiki/Whitespace_(programming_language)" rel="nofollow noreferrer">a funny idea</a> for it at the pub. So it would be strange if there <em>weren't</em> thousands of the things out there!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-01-05T01:06:06.897Z
Answers.LastActivityDate: 2022-01-05T01:06:06.897Z
Answers.UserDisplayName: kaya3
Body: <p>One language is better. It is just better to learn one language rather than learn C++,
  Python, C#, etc.</p>
  <p>Just build one language that makes you build apps, websites, games, AIs, etc.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-02T13:40:35.573Z
Comments.Text: Two very different answers. Theoretical answer : Godel's second incompleteness theorem guarantees that language "power" is an infinite hierarchy. Real (aka practical) answer: real-politik: How much gap between C# and Java? The answer depends entirely on whether it's a scientific, technical, managerial or political question. Also note that the variety generated by the theory {assembly, C, Haskell, python} is vastly different from practicality
Comments.UserDisplayName: Rushi
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-02T16:01:17.830Z
Comments.Text: Why isn't there one human/natural language instead of so many?
Comments.UserDisplayName: Erik Eidt
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-02T21:18:21.040Z
Comments.Text: https://xkcd.com/927/
Comments.UserDisplayName: Nick Matteo
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-02T22:33:59.277Z
Comments.Text: In 1970 we used Algol, APL, Fortran at my university. The Polytechnic also taught Cobol. I recall someone from the Computer Science Department giving an enthusiasm presentation on the Language of the Future, PL/1 (Programming Language 1), which was going to sweep the others away. Instead we saw the situation that @NickMatteo described. (I removed PL/1 from my CV in 1985, after I landed a contract fixing bugs in a PL/1 payroll application. I hear they eventually rewrote in Cobol).
Comments.UserDisplayName: Simon Crase
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-02T22:40:19.357Z
Comments.Text: BTW, here is the [Tower of Babel](https://www.cs.uaf.edu/~cs331/notes/Babel.gif) from Communications of the Association for Computing Machinery in January 1961. I recall reading an article in CACM some time during the 1970s; the Tower of Babel had now reached 400 languages, and they couldn't afford to spend resources listing the names of languages any longer.
Comments.UserDisplayName: Simon Crase
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-02T23:33:02.797Z
Comments.Text: In the near future, you'll just need to know English to speak with the multitudes of AI things sprouting from every surface and striving to handle your every whim.
Comments.UserDisplayName: Scott Rowe
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-03T03:37:59.970Z
Comments.Text: The almost [identical question](https://cs.stackexchange.com/q/451/24043). With similar answers being repeated.... Including cartoons 
Comments.UserDisplayName: Rushi
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-03T08:37:19.033Z
Comments.Text: @Rusi The question looks the same, but it is asked in a different context. In this SE, we are talking about education, so here the question is about why students need to learn more than one.
Comments.UserDisplayName: Stig Hemmer
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-03T10:21:16.417Z
Comments.Text: The question doesn't appear to be about anything; it includes two statements that are both clearly controversial if even factual. The title is the only place a question mark appears, and the sentence before it shows this is a duplicate of what Rusi has suggested.
Comments.UserDisplayName: Nij
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-03T15:50:12.140Z
Comments.Text: Is this about a single programming course which uses 2 or more languages? Or a 2-semester sequence which switches languages after the 1st, or a program which starts in 1 language but uses different ones for database, compiler, AI... courses? Or...?
Comments.UserDisplayName: Owen Reynolds
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-03T16:30:20.197Z
Comments.Text: I am personally baffled by the existence of more than one hammer type/style/weight so hang in there!
Comments.UserDisplayName: MonkeyZeus
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-03T17:33:32.580Z
Comments.Text: Why isn't there just one of anything? Why isn't there just one stackexchange site? Why isn't there just one question?
Comments.UserDisplayName: Caius Jard
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-03T18:22:33.407Z
Comments.Text: @CaiusJard 42 .
Comments.UserDisplayName: Bergi
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-03T18:55:01.753Z
Comments.Text: Closing as a duplicate of answer with ID 42...
Comments.UserDisplayName: Caius Jard
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-03T20:10:16.477Z
Comments.Text: @ErikEidt I think the reasons for diverse natural languages and diverse programming languages are very different....
Comments.UserDisplayName: Ovi
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-03T21:26:19.150Z
Comments.Text: Where is your research, or even your own opinion?
Comments.UserDisplayName: Robbie Goodwin
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-04T01:51:23.907Z
Comments.Text: How on Earth did this get upvotes? The only person who could possibly ask it has obviously never done those things, much less taught them to someone else!
Comments.UserDisplayName: Jared Smith
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-04T03:56:52.237Z
Comments.Text: @ovi  for that. Dijkstra used to fulminate against "anthropomorphisms" one of which was "language". As he pointed out a PL is really a mathematical notation; analogising it to a natural language is a source of endless confusion
Comments.UserDisplayName: Rushi
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-04T11:29:33.173Z
Comments.Text: @NickMatteo the Alt text is even more funny now given that we're now up to USB-C.. and there are so many different standards that now go through that identically shaped connector. It's almost become even worse.
Comments.UserDisplayName: htmlcoderexe
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-04T17:16:49.647Z
Comments.Text: @StigHemmer Yes, there's a decent "why don't all ComSci programs agree on a single language for teaching purposes and consistancy" Q which could be asked. But this poorly-written Q is clearly about why multiple languages were developed. And so are the answers (IMHO it's typical HotQuestions nonsense where no-one looks at the Room name). I suspect the OP didn't even mean to post on Educators.
Comments.UserDisplayName: Owen Reynolds
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-04T18:15:12.047Z
Comments.Text: I'm kinda amused by the OP's choice of username; I can't help but think the eponymous operation was not executed
Comments.UserDisplayName: Caius Jard
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-04T18:57:50.070Z
Comments.Text: If there were only only one language it would be Common Lisp. Do you know it?
Comments.UserDisplayName: Joshua
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-04T20:52:29.193Z
Comments.Text: As the answers show, this question is actually a good spring-board for discussion.  Obviously, there is a need for many languages, but many of the answers show why, or good analogies such as a tool-box.
Comments.UserDisplayName: JosephDoggie
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-05T03:27:54.260Z
Comments.Text: If there were only only one language it would be R6R. Do you know it?
Comments.UserDisplayName: copper.hat
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-05T14:35:23.517Z
Comments.Text: academia: why are there different citation formats?
Comments.UserDisplayName: BCLC
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-05T19:57:55.487Z
Comments.Text: @JosephDoggie But you know Q's which are "a good springboard for discussion" aren't allowed, right? SE is for questions with answers; that's why the replies are called Answers. You also understand this is the ComSci Educators area, and the Q isn't about education?
Comments.UserDisplayName: Owen Reynolds
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-05T20:10:51.460Z
Comments.Text: One could trivially rephrase it to make it about education (which may be implied in the question):  Why isn't there one language to used to teach computer science (etc) instead of different programming languages?
Comments.UserDisplayName: JosephDoggie
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-05T21:04:22.947Z
Comments.Text: Imagine there was one language and someone had an idea to make it better. Then what?
Comments.UserDisplayName: Criticize SE actions means ban
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-08T23:46:55.137Z
Comments.Text: Go on, then… tell us about that one language.
Comments.UserDisplayName: Robbie Goodwin
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-10T20:41:41.447Z
Comments.Text: the goal is to keep thing simple and easy for learn language that is it
Comments.UserDisplayName: search for answers
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-10-11T22:02:26.583Z
Comments.Text: The proper counter-questions are probably "Which one and why?"
Comments.UserDisplayName: Thorbjørn Ravn Andersen
Tags: <programming>
Title: Why isn't there one language to use instead of different programming languages?
ThreadText: # Why isn't there one language to use instead of different programming languages?
  
  (Asked by: username_0 on 2022-01-02)
  
  One language is better. It is just better to learn one language rather than learn C++,
  Python, C#, etc.
  
  Just build one language that makes you build apps, websites, games, AIs, etc.
  
  **Tags:** programming
  
  > **Comments:**
  > **username_1**: Two very different username_0. Theoretical answer : Godel's second incompleteness theorem guarantees that language "power" is an infinite hierarchy. Real (aka practical) answer: real-politik: How much gap between C# and Java? The answer depends entirely on whether it's a scientific, technical, managerial or political question. Also note that the variety generated by the theory {assembly, C, Haskell, python} is vastly different from practicality  
  > **username_2**: Why isn't there one human/natural language instead of so many?  
  > **username_3**: https://xkcd.com/927/  
  > **username_4**: In 1970 we used Algol, APL, Fortran at my university. The Polytechnic also taught Cobol. I recall someone from the Computer Science Department giving an enthusiasm presentation on the Language of the Future, PL/1 (Programming Language 1), which was going to sweep the others away. Instead we saw the situation that @username_3 described. (I removed PL/1 from my CV in 1985, after I landed a contract fixing bugs in a PL/1 payroll application. I hear they eventually rewrote in Cobol).  
  > **username_4**: BTW, here is the [Tower of Babel](https://www.cs.uaf.edu/~cs331/notes/Babel.gif) from Communications of the Association for Computing Machinery in January 1961. I recall reading an article in CACM some time during the 1970s; the Tower of Babel had now reached 400 languages, and they couldn't afford to spend resources listing the names of languages any longer.  
  > **username_5**: In the near future, you'll just need to know English to speak with the multitudes of AI things sprouting from every surface and striving to handle your every whim.  
  > **username_1**: The almost [identical question](https://cs.stackexchange.com/q/451/24043). With similar username_0 being repeated.... Including cartoons   
  > **username_6**: @Rusi The question looks the same, but it is asked in a different context. In this SE, we are talking about education, so here the question is about why students need to learn more than one.  
  > **username_7**: The question doesn't appear to be about anything; it includes two statements that are both clearly controversial if even factual. The title is the only place a question mark appears, and the sentence before it shows this is a duplicate of what Rusi has suggested.  
  > **username_8**: Is this about a single programming course which uses 2 or more languages? Or a 2-semester sequence which switches languages after the 1st, or a program which starts in 1 language but uses different ones for database, compiler, AI... courses? Or...?  
  > **username_9**: I am personally baffled by the existence of more than one hammer type/style/weight so hang in there!  
  > **username_10**: Why isn't there just one of anything? Why isn't there just one stackexchange site? Why isn't there just one question?  
  > **username_11**: @username_10 42 .  
  > **username_10**: Closing as a duplicate of answer with ID 42...  
  > **username_12**: @username_2 I think the reasons for diverse natural languages and diverse programming languages are very different....  
  > **username_13**: Where is your research, or even your own opinion?  
  > **username_14**: How on Earth did this get upvotes? The only person who could possibly ask it has obviously never done those things, much less taught them to someone else!  
  > **username_1**: @ovi  for that. Dijkstra used to fulminate against "anthropomorphisms" one of which was "language". As he pointed out a PL is really a mathematical notation; analogising it to a natural language is a source of endless confusion  
  > **username_15**: @username_3 the Alt text is even more funny now given that we're now up to USB-C.. and there are so many different standards that now go through that identically shaped connector. It's almost become even worse.  
  > **username_8**: @username_6 Yes, there's a decent "why don't all ComSci programs agree on a single language for teaching purposes and consistancy" Q which could be asked. But this poorly-written Q is clearly about why multiple languages were developed. And so are the username_0 (IMHO it's typical HotQuestions nonsense where no-one looks at the Room name). I suspect the OP didn't even mean to post on Educators.  
  > **username_10**: I'm kinda amused by the OP's choice of username; I can't help but think the eponymous operation was not executed  
  > **username_16**: If there were only only one language it would be Common Lisp. Do you know it?  
  > **username_17**: As the username_0 show, this question is actually a good spring-board for discussion.  Obviously, there is a need for many languages, but many of the username_0 show why, or good analogies such as a tool-box.  
  > **username_18**: If there were only only one language it would be R6R. Do you know it?  
  > **username_19**: academia: why are there different citation formats?  
  > **username_8**: @username_17 But you know Q's which are "a good springboard for discussion" aren't allowed, right? SE is for questions with username_0; that's why the replies are called username_0. You also understand this is the ComSci Educators area, and the Q isn't about education?  
  > **username_17**: One could trivially rephrase it to make it about education (which may be implied in the question):  Why isn't there one language to used to teach computer science (etc) instead of different programming languages?  
  > **username_20**: Imagine there was one language and someone had an idea to make it better. Then what?  
  > **username_13**: Go on, then… tell us about that one language.  
  > **username_0**: the goal is to keep thing simple and easy for learn language that is it  
  > **username_21**: The proper counter-questions are probably "Which one and why?"  
  
  ---
  
  ## 16 answers
  
  ### Answer by username_32 on 2022-01-02. Score: 21 | Accepted answer
  
  In theory, you only need one language and, provided that it is [Turing Complete](https://en.wikipedia.org/wiki/Turing_completeness), any language will do. But...
  
  "In theory, theory is the same as practice, but not in practice." (Often attributed to Yogi Berra).
  
  If you only ever want to learn one language, it should probably be C, though C has a number of twists and turns that make it difficult to consistently produce error-free software. It is, however, a low (close to the hardware) enough language that you can do anything you like.
  
  However....
  
  If you program in a low level language for a long time, or if many people do so, then what you find is that the same sorts of things are being written over and over again and debugged over and over again. This is undesirable, so the practitioners will build libraries that capture things frequently done. But hundreds and hundreds of libraries have their own problems; among them, just finding what you need.
  
  So...
  
  People decide that it would be an advantage to "capture" the commonly done things as "abstractions" in a new language built on top of the old.
  
  In FORTRAN, for example, there were functions that captured commonly needed actions (trig functions, for example). FORTRAN was built on top of machine language, as was C, which also uses functions as its main abstraction mechanism.
  
  And then...
  
  Programmers decide that the actual structure of a program is looking a lot like the structure of some other program and so, just maybe, those structures can be captured as language "features", leading to the writing of new languages.
  
  Now it starts to get interesting.
  
  Some folks have the insight that mutability of data isn't really essential to (most) computation and that programs compute *values*, possibly complex. So a new language, say LISP, is created to capture this insight and it proves fruitful.
  
  Other folks find themselves doing a lot of modeling of *things* and so they ask whether the properties and actions of those things can be captured directly at the language level, rather than have to be reconstructed from the simplest actions of something like C. That led to both Simula and Smalltalk (which have some conceptual similarities).
  
  Now, and this is the important bit:
  
  A language that does a good job with abstraction will provide to the programmer a complete (in the sense of Turing) and consistent mental model in which to program, making it unnecessary to think about the underlying implementation and even permitting you to forget that there is some machine that a program might manipulate.
  
  Such a language also provides a mental model of the nature of computation. A functional programmer is led/encouraged by the language (perhaps Scheme) to think in a certain way. Object Oriented Language (Smalltalk...) encourage you to think in a different way. Each of those mental models, if complete and consistent can help you formulate and solve programming problems as they arise. These different mental models are called *paradigms*.
  
  Just as you don't need to understand Sanskrit to understand English, you don't need to understand machine language to understand Scheme or Java. Each of those (among many others) provides a model of computation in which you can describe any computable process in a consistent way. Buried in all of that are the earlier libraries that people used to have to build, along with (big big point) the insights that were gained in earlier programming attempts.
  
  As long as we can envision higher levels of abstraction, there will be an impetus to create computer languages that try to capture those abstractions so that they can be manipulated *easily* and *consistently* by working programmers.
  
  And then, programmers who want to be productive, will try to match the language to the task at hand as well as choosing a language that has abstractions appropriate to that task.
  
  ---
  
  For an example of what I mean by capturing abstractions, consider the problem of building dynamic data structures such as binary trees and such. In a language like C or early versions of C++ these are specifically allocated (on the heap) but also need to be specifically deallocated somewhere in the program. The implication is that the memory management "problem" needs to be resolved in every program that uses dynamic allocation. Every program. In a language like Scheme or Java, on the other hand, there is a *garbage collector* that assure that deallocation is done correctly. The garbage collector needs to be verified only once, not redesigned and re-validated for every program. This frees the program to put their mental energy elsewhere.
  
  I once (unintentionally) put a deallocation bug in a C++ program. The correction took me 24 hours to find. The solution required a one character change to the program. One character progress per 24 hours isn't very efficient.
  
  > **Comments:**
  > **username_33**: You advocate C as a good first-choice language, and then you talk about allocation bugs. Yep, that's C. But you equivocate C++ with C in that respect and that's wrong. C++ has "RAII" which means that you basically never have to worry about leaks and de-allocation. I teach my students to use `std::vector` for arrays, and they never have memory leaks or deallocation bugs. For students that you would teach in C, modern C++ (meaning 17 and later) is a better language.  
  > **username_32**: @username_33, my comments about C++ are accurate for the time that this occurred. I'll make that a bit clearer. But the programmer there still needs to use the right libraries, so the problem hasn't gone away. So, in a way, you are making my point.  
  > **username_34**: "you basically never have to worry about leaks and de-allocation" modern C++ helps a bit in that you no longer have to do the deallocation manually, but you still have to think about when it will happen and whether the time it will happen is appropriate for your program.  
  > **username_35**: @username_33 - `std::vector` and an array aren't the same...  
  > **username_33**: @Persistence I never said they were. I said that if you need something that behaves like an array, always use `std::vector`. Maybe `std::array`, but not `int x[5]`. Or `new int[5]`.  
  > **username_33**: @username_34 For sophisticated enough examples (stack overflow in destructing a very long linked list) you're right. But that's not something beginnning programmers have to worry about. First learn programming with safe mechanisms, worry about the fine points later.  
  > **username_5**: I think we should resist being encouraged to think a certain way.  
  > **username_36**: "*that assure that deallocation is done correctly*" Correctly, sure - but now you have a different problem, which is the time delay between a program finishing using memory and the memory being available for use again. On a PC with small quantities of data and ludicrously large RAM, this isn't a problem. But with big data or not much RAM, this fails ***hard***. I have personally seen this when working on a car multimedia box using C# and .NET Compact Framework. I believe team members spent much longer on getting GC to work with limited resources than had we just used C++.  
  > **username_37**: C would be a terrible choice of first/only language for someone who wants to create "apps, websites, games, AIs, etc." Nobody uses C for these things. I've been a professional business software developer since 2005, and I've never used C at all.  
  > **username_32**: @username_37, yes if you want to do a particular thing, use an appropriate language. But if you want one and only one programming language for everything, then C will work, even if badly for some things.  
  > **username_37**: @username_32 The OP didn't say "everything." You're answering a different question.  
  > **username_32**: @username_37, but the OP _did_ ask about _one programming language_.  
  > **username_37**: @username_32 ...for a list of purposes that notably does *not* include the kinds of things (e.g., operating systems, embedded devices) that would make C a compelling answer.  
  > **username_5**: C is terrible for web sites, but C# is peachy. Because... Someone implemented an environment that makes it work well.  
  > **username_38**: @username_33 - wait, now _C++17_ is "modern" (and all else, by implication,  passé)?  My how time flies!  (I'm so old I remember when _C++11_ was considered "modern" ... and we had to wait patiently for a compiler to support it ...)  
  > **username_32**: @username_38, to further emphasize my points, note that while the name remains the same, the language designed by Stroustrup isn't the same as today's C++. It has commonalities, but is a different language in many ways.  
  > **username_39**: _Just as you don't need to understand Sanskrit to understand English, you don't need to understand machine language to understand Scheme or Java._ Maybe change Sanskrit to Proto-Indo-European? Although I'm not certain that such a comparison is useful since all high level languages must be executed as CPU instructions, whereas the same is not true for natural languages; natural languages don't translate down to a (frequently common) lower level language.  
  > **username_35**: @username_33 - I'd argue that vectors and arrays behave very differently. Sure, you can use them interchangeably for a lot of things but they also have a few very important differences that are crucial to understand. As long as you explain those to your students, I suppose it's not a bad approach though  
  > **username_21**: The first computer language you learn forms your brain and there is a lot to unlearn when going on to other languages.    For that reason alone C is not a good first language, but an excellent choice later if you need to go close to the hardware.  
  
  ---
  
  ### Answer by username_27 on 2022-01-02. Score: 43
  
  I'm going to echo what [username_32 said](https://cseducators.stackexchange.com/questions/7186/why-there-isnt-one-language-to-use-instead-of-different-programming-language/7187#7187), but in a different manner.
  
  All of the great languages have a sort of direction that they point in. For instance, the [Excel language](https://www.infoq.com/articles/excel-lambda-turing-complete/) (yes! The one from the spreadsheets!) is really great at short scripts that manipulate and represent data. By contrast, the [C](https://en.wikipedia.org/wiki/C_%28programming_language%29) language is excellent at telling hardware what to do, while [Mathematica](https://en.wikipedia.org/wiki/Wolfram_Mathematica) excels at representing a lot of advanced mathematical functionality very simply.
  
  There is nominally no task that you can do in any of those languages that you cannot do in the others. However, you will find it extremely difficult to go *against the grain* of the language. Want to create a program to rapidly edit and make visualizations of data in C? You can do it, but you could spend years on it and never make it as convenient as Excel. Want to do very small, very fast operations that C makes simple as could be? Excel would rapidly become a nightmare.
  
  The different languages have been created to optimize different kinds of actions, and the great languages each do exceedingly well at what they are designed for.
  
  That's the key to why we need different languages. We need to do different tasks, and we want languages that generally work with us to get us there, and don't actively get in our way all the time.
  
  > **Comments:**
  > **username_5**: As best I know, Excel is the most used application on Earth. (Not sure about any other planets.)  
  > **username_1**: What's good about this answer is your exemplar set : {excel, C, mathematica}. With such a wide-based set the variegatedness  of PLs becomes obvious. What I tried to explain v briefly in [my comment](https://cseducators.stackexchange.com/questions/7186/why-there-isnt-one-language-to-use-instead-of-different-programming-language#comment18650_7186) is that that variety is not just a matter of fact; it's a matter if necessity. That this point obscures the other dimension -- needless variety -- is unfortunately left out (in all username_0 so far). IOW q is genuine  
  > **username_28**: Different languages for different purposes are not unlike different solutions for various tasks we have in any other domain. E.g. to make drawings on paper we can use pens, pencils, crayons, a laser printer, or an offset press - vastly different methods with vastly different uses.  
  > **username_29**: For an example of an unfashionable but useful language in an analog vein to Excel, in a past life I wrote a couple systems in dBase/FoxPro. It was incredibly easy to set up an application to access and use a database for a small business.  
  > **username_30**: Note:  "Want to create a program to rapidly edit and make visualizations of data in C?"  This was done; the name of one of these programs is Excel.  Though they may have used C++.  
  > **username_31**: @username_30 While Excel itself is written in C or a close derivative, I think username_27. was referring to the actual formulas end users write into the spreadsheet cells.  
  > **username_30**: @username_31  I agree; just filling out the "you could spend years on it" part.  
  > **username_31**: @username_30 I don't follow.  
  
  ---
  
  ### Answer by username_45 on 2022-01-03. Score: 24
  
  Imagine you open a carpenter's toolbox and you see
  
  * a hammer and some nails
  * a screwdriver and some screws
  * a bottle of glue
  
  You are incredulous. All three of these things are used for joining two pieces of wood together. Why in the heck would the carpenter carry around *three* different things that all do the same job? Why would he learn how to use all three tools, when he could learn just one?
  
  Of course, the answer is that some tools are good for some jobs, but bad for others. In some situations, glue works great but nails and screws would not. Other situations, glue is horrible, screws are great, and nails would okay. For some jobs, all three might work equally well.
  
  It's the same with programming languages. For some jobs, this language is great but that language is horrible. For others it is the opposite.
  
  > **Comments:**
  > **username_5**: 3 tools, Ok. 300 though? Once you have the basic useful ways to solve a problem, why create more ways? I wonder why we are still creating more languages? Architecture pretty much stopped with the advent of steel framing and reinforced concrete, 100 years ago. What do they know about solving problems that we don't?  
  > **username_45**: @username_5 I think you answered your own question.  Computer hardware is continuing to evolve, so there are now problems to be solved that did not even exist when older languages were designed.  For example, in the 1960s most input/output was on punched cards.  Nobody had screens or keyboards.  "User interface" was not even a thing that languages tried to address.  When the fancy new-fangled "command line interface" was introduced, languages came along to make use of it, then later GUIs,  etc.  
  > **username_46**: @username_5 it's like saying "once you have three fields of mathematics, why create more fields?". it's like saying "once you have civil engineering, mechanical engineering, and architecture, why do other engineering disciplines exist?". the short answer is, there are more goals here than just "if it's strong enough it's good enough". especially considering (using an architecture analogy because why not) the building will need to periodically change to incorporate new features, so the (complicated) plans will have to be easy to understand  
  > **username_1**: @username_46 At a more fundamental level: when I was a student the two metrics that an algorithm would/should optimize were space and time. Come phones and a third more crucial appears : battery-life!!  
  > **username_1**: A funny version just saw of world changing : I asked my daughter to hand me the phone book.  She laughed at me, called me a dinosaur and handed me her iphone. So the spider is dead, the iPhone is broken and daughter furious  
  > **username_5**: @Rusi for a moment I thought that you meant you had damaged a web crawler. What did people often use the Sears catalog for 100 years ago? Don't try that with your phone! xkcd.com/2212/  
  > **username_31**: @username_5 So it took some 10000 years to (dubiously) completely solve architecture? Great, only about 9900 years to go for computer architecture!  
  > **username_47**: @username_5 Have you ever seen how many different types of screw there are? Or even just how many different [types of screw _head_](https://en.wikipedia.org/wiki/List_of_screw_drives)? Phillips introduced crosspoint drive; Pozidriv brought further improvements; then there's JIS B 1012, Supadrive, Phillips II, Frearson, French recess, Motorq… and that's before we get onto the square ones, hex, pentalobes, hexalobes, combinations, external drives, and _then_ all the security screws designed specifically to be incompatible with everything else… Carpentry may be a better example than it seemed :-)  
  > **username_21**: @username_5 Your assumption that we have found the optimal way of expressing how to instruct a computer to do things, is probably not holding up.  We are still trying to figure out how to write short, elegant stuff that actually work _and_ scale.  
  > **username_5**: @username_21 I agree that it is a complex field, but I have seen and created a lot of 'simple' ways to solve particular problems. Usually they are too limited or are not widely used. Complex methods are great once you are an expert, but hard to learn and still have vexing hidden pitfalls. I suppose I should have taken aim at the overly elaborate and optimistic requirements and expectations instead? Make the problem simpler first. In a previous job, we used to tell the Sales people to learn to say No. Let someone else say Yes and wade in to the tar pit :-)  
  > **username_21**: @username_5 in my experience, if something allows a simple solution it is because username_46 did a lot of work allowing it to be simple.  Excel is a good example of an environment allowing you to create quick and simple solutions for a data based problem.  The amount of work gone into excel is staggering.  
  > **username_5**: @username_21 Excel was said to be the most used application in the world. I do agree that it is amazing and so is the level of effort for, what, almost 40 years? This tablet browser gives me fits though! :-)  
  > **username_21**: @username_5  Yes.  Why would you need anything else?  
  
  ---
  
  ### Answer by username_33 on 2022-01-02. Score: 20
  
  This is a CS variant of the Sapir-Worff hypothesis: your world view is shaped by your language. Different programming languages make you think in different ways, and are suitable for different purposes. In CS terminology, there are different "paradigms". Some languages are imperative, some declarative. There are functional and logic languages. And they all make you think just a little differently.
  
  > **Comments:**
  > **username_5**: Maybe we should decide what we want to achieve before we pick up the tools? Then choose the tool that makes it easier for us. Why are people being shaped by what they learn? I thought that the point of education was to learn to think for yourself.  
  > **username_48**: Or, put the other way, there are different ways that it is useful for programmers to think, and different languages are better for writing those thoughts in.  
  > **username_46**: @username_5 because it's extremely hard to figure out what language you *really* want - there are an awful lot of languages out there, and chances are, a better one is just not as popular - hence you won't find it, let alone use it. also, a) it's a lot easier to use a language you already know than it is to learn a new one (potentially risking much frustration, encountering shortcomings etc.) and b) sometimes a project needs to be worked on by several people, some of whom just don't have the time to learn a new language (esp. fluently enough to write good programs with it)  
  > **username_5**: @username_46 the problems you mention exist because there are so many languages. It's the same with spoken and written language: we would be better off with just 2 (French is so good for swearing, someone said).  
  > **username_1**: @username_46 you're spelling out the [blub paradox](http://www.paulgraham.com/avg.html) : viz the languages you'll likely consider are minor variations of your known-set. For the significant game changer (a) you would not know of it (as you point out) Or (b) you would know of it merely as a name Or (c) you will study it as a strange and convoluted way of replicating your familiar set, **never really getting why on earth anyone does that changeover.** As the saying goes: You can write FORTRAN programs in any language   
  > **username_48**: *"there are an awful lot of languages out there, and chances are, a better one is just not as popular"* - on the other hand, the less popular a language is, the less *useful* it is, because unpopular languages don't have as good third-party libraries, support, or learning resources. So even if you insist on learning *the most useful* language rather than just a language which is good enough for your purposes, you don't have to consider literally every language ever designed; you don't even need to consider languages below a certain popularity unless there is a strong reason for a specific use.  
  > **username_21**: @username_48 the devil is in the phrase “better language”. There might be technical or political reasons for a given language to be better than another.  I’ve been in a situation where Perl was the best option for business critical high performance code and in others where Java was the _only_ option for solving a problem across a complex network. Thankfully docker and kubernetes lessen the pain.  
  > **username_21**: And I agree that the languages you know influence the way you think.  If you know Prolog and Lisp and Haskell you have more tools in your box  
  
  ---
  
  ### Answer by username_40 on 2022-01-03. Score: 9
  
  The US Department of Defense actually *did* create and use one programming language for basically all its varied programming tasks for about 10 years. As stated in [A programming language developed by the US department of defense was name to honor a famous female mathematician Name this programming language?](https://www.username_0.com/Q/A_programming_language_developed_by_the_US_department_of_defense_was_name_to_honor_a_famous_female_mathematician_Name_this_programming_language)
  
  > Ada is a structured, statically typed, imperative, and object-oriented high-level computer programming language, extended from Pascal and other languages. It was originally designed by a team led by Jean Ichbiah of CII Honeywell Bull under contract to the United States Department of Defense (DoD) from 1977 to 1983 to supersede the hundreds of programming languages then used by the DoD.
  
  Also, [U.S. DoD Use of Ada](https://dwheeler.com/lovelace/doduse.htm) explains
  
  > With various exceptions and waivers the U.S. DoD was required to use Ada when it develops its own software. This requirement was often called the "Ada mandate". A summary discussion of the U.S. DoD Ada mandate, as well as related documents, are available. The basic text of the Congressional mandate is:  
  >   
  > "Notwithstanding any other provisions of law, where cost effective, all Department of Defense software shall be written in the programming language Ada, in the absence of special exemption by an official designated by the Secretary of Defense."
  
  In the [Does the Defense Department still promote the Ada programming language?](https://www.quora.com/Does-the-Defense-Department-still-promote-the-Ada-programming-language) Quora thread, the answer by [Rochus Keller](https://www.quora.com/profile/Rochus-Keller) explains that the requirement mentioned above started in $1987$. Also, the answer by [Jim Rogers](https://www.quora.com/profile/Jim-Rogers-38) says
  
  > A short history of the Ada language mandate is found in [Ada Programming Language - AcqNotes](https://acqnotes.com/acqnote/careerfields/ada-programming-language). The concluding paragraph indicates that the Ada Mandate was effectively removed in 1997 when the DoD began to embrace Commercial Off The Shelf (COTS) technology.
  
  I've used quite a few different programming languages, but I've never done any programming using Ada, and know relatively little about the language. However, in 1987 (when Ada use was initially mandated) and 1988, I was working for Netron (a Toronto, Ont. company) on a COBOL related project with IBM for Westpac Banking Corporation in Sydney, Australia. I recall a discussion with several programmers (note I'm unsure to what extent any of them had used Ada before) about a major problem with Ada being that it tries to do basically everything, with this making it so large and complicated that it's difficult to learn and use, as well as it not being a particularly good choice for many programming tasks. On the other hand, the Quora [thread](https://www.quora.com/Does-the-Defense-Department-still-promote-the-Ada-programming-language) I mentioned above has several Ada programmers explaining some of Ada's significant strengths.
  
  In conclusion, since the US DoD was unsuccessful (due to both subjective, as well as objective, reasons) in creating and using one language to fulfill almost all of its myriad requirements, I doubt that any entity, public or private, can create just *one* programming language to be able to do basically everything well.
  
  > **Comments:**
  > **username_41**: Well of course the Ada functionally failed, it was a government project after all... And yes, one of the big issues with Ada is that it tries to do everything. This is a recurring issue with a _lot_ of DoD projects actually.  
  > **username_42**: Of the DoD projects my favorite was [APRANET](https://en.wikipedia.org/wiki/ARPANET). As bad as it is, it was still a success of some degree.  
  > **username_43**: Having some industry level experience with Ada, I have observed lots of Ada-“bashing” from people who where actually unaware of many (if any) of its numerous strengths, and how valuable they are once you get acquainted with. Some  
  > **username_43**: Sometimes, I feel that one thing is forgotten : it is not just about tools and usage, but programming community is also subject to trends/hype/fashion, which is not always guided by pure problem<->tool relationship.  
  > **username_5**: And there is that GPS thing, but who uses that?  
  > **username_38**: Let's be fair to Ada and the government (military), huh?  The situation back then was that for every machine architecture they were buying equipment in - and there were a _lot_, even military "standardized" ones - they _each_ had their own language(s), and thus their own toolsets.  Don't be fooled by the fact that many of those languages were named "JOVIAL" - in many respects they were sufficiently different dialects that there were several (well, at least 2) companies whose entire business model was making one compiler toolchain after another for different JOVIALs for different projects ...  
  > **username_38**: ( .... and not just toolchains, but documentation, training, practices, etc. etc. etc. etc.  The military desire/need for Ada was to solve a real problem ...)  
  > **username_40**: @username_43 Thanks for the feedback. I tried to have my answer be relatively objective, balanced and fair. Although I don't know much about Ada, I agree it has various significant strengths. I hope you didn't consider my answer to be Ada-"bashing". On rereading it, I realized I could improve its balance so I've edited it, e.g., I mention I'm unsure how much the Sydney programmers knew about Ada, the Quora thread mentions various strengths, and Ada failing was also due to subjective reasons. I hope this is better, but please let me know if there's anything you can suggest to improve it.  
  > **username_40**: @username_38 As I mention in my response above to username_43, I tried to be fair, but  made some changes just now to try to improve that. Although my knowledge of the US DoD's needs and Ada are very limited, from what I've read & learned just recently when researching for my answer, it seems to me that what you wrote is very reasonable.  
  > **username_43**: I do not consider there are any bashing here ;) I feel that the DoD failed with its Ada project. But Ada in itself was far ahead of the competition. E.g : Discriminent records existed long before other languages considered “optional”s. (The quora thread is interesting, although opinions are a bit dated : compiler is the first tier for Ada code checking, linter exists in the form of compiler + libadalang, language has a 2012 standard and a 2015 coming, formal proofs tool exists (SPARK)…  
  > **username_38**: @username_43 - one thing I always considered unique and innovative: tasks were first class types that could be _members of packages_ with decent semantics defined for that ownership relationship.  Contrast with nearly all languages today for which tasks (i.e., threads) are merely the thinnest possible wrapper over an OS construct and you're own your own w.r.t. all thread operation semantic.  
  > **username_24**: One issue with Ada was that the compiler would not fit on a PC.  I reviewed an implementation that came with its own 4MB expansion card and the software only worked with that specific card (this was before "DOS Extenders").  I recall complaints (from mainstream implementations) that compiling and linking was ridiculously slow.  Of course, C++ (that is, the Cfront implementation) would not fit on a PC either.  
  > **username_24**: Re _But Ada in itself was far ahead of the competition._  I got the impression that Ada missed the boat.  The Object Oriented _paradigm shift_ had started, and a design decision was that Ada was fundamentally unable to do run-time polymorphism.  The philosophy was that once some code was done and tested, nothing else in the program should be able to alter that behavior.  So, no pointers to functions: any such choice had to be a fixed `case` statement listing all the possibilities up front.  BTW, discriminated records are in Worth's Pascal.  
  > **username_37**: @username_24 It doesn't seem to have mattered in the end, since most developers never grokked OOP, and later generations [hate it](https://thenewstack.io/why-are-so-many-developers-hating-on-object-oriented-programming/) because they [never saw it used properly](http://nomad.uk.net/articles/developers-who-hate-on-oop-don't-know-how-to-use-it.html). We watched the same thing unfold with checked exceptions.  
  > **username_21**: Wonder what the world would have looked like if Microsoft had made Ada.Net.  
  
  ---
  
  ### Answer by username_44 on 2022-01-04. Score: 9
  
  > One language is better.
  
  Sure, and if you ask five people *which* one language is best, you'll get six username_0.
  
  Computer programming is not a solved problem. We're still learning the best ways to do it. Some languages are better suited for certain tasks, but there's also plenty of room for differences of opinion even with a single well-defined problem domain.
  
  > **Comments:**
  > **username_27**: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/132992/discussion-on-answer-by-username_44-why-isnt-there-one-language-to-use-instead-of-dif).  
  
  ---
  
  ### Answer by username_49 on 2022-01-02. Score: 6
  
  Really, when making your own language is something people or companies *can* do, it's almost the default for that to start to occur.
  
  Let's say there *was* just one language everyone used, or perhaps a couple of them to cover all the different paradigms. Chances are, not everybody's going to like parts of it. Maybe some aspect of the syntax seems weird to some users, or it's not fast enough, or it's not as portable as people wish it was. So, what happens? Someone makes a new one, quite possibly just an incremental improvement on the one they were using before (think C++, Kotlin, or Typescript).
  
  A programming language will never be "one size fits all". People from different backgrounds, like C, Python, or Haskell, will find different syntax more intuitive, and will have different needs and expectations for what a language provides (e.g., garbage collection, first class functions, a large standard library, and so on). The natural result of this is more languages being made.
  
  > **Comments:**
  > **username_5**: Anyone can create a Domain Specific Language to solve a particular problem, I have done that several times. I didn't expect anyone else to want to use it though.  
  > **username_49**: @username_5 I'm talking more about general purpose languages, but yeah there's bound to be zillions of languages used personally/within companies, or made [for fun](http://esolangs.org/wiki/Main_Page).  
  
  ---
  
  ### Answer by username_50 on 2022-01-04. Score: 5
  
  *The Title of your post, and the content are two very different questions!*
  
  ## Should you learn just one language?
  
  I want to say initially **yes**, but ultimately you may need to learn a number of languages in your career if you want to develop on or for the latest hardware and operating systems as they evolve.
  
  The programming language is really just syntax for compiler instructions. After you gain proficiency in a language you will hopefully gain an appreciation and understanding for how that language works, if not why it works. Different languages are written for different compilers, once you understand one language then picking up another language can be much simpler if you understand how the new language syntax structure relates to the language you are proficient in. So once you gain proficiency in one language, transferring to another should be much lower effort.
  
  The counter argument to this is that it takes a lot of practise and therefor a long time to gain proficiency in one language. Instead by learning and using multiple languages at the same time, you can pickup the similarities and differences quicker and may gain a better understanding of computer science concepts in general because you will more practised at differentiating between language and concept.
  
  From a formal education point of view, it becomes *practical* from a tooling/teaching/resource perspective for institutions to streamline the teaching of many different concepts into using the same language. You want to minimise the time and effort it takes to get your learning and development environments up and running. If you reduce the language and environment options you can reduce the documentation and guidance that you may need to provide but you can also maximise the returns on pre-requisite knowledge across subjects/units.
  
  What is important to the institution is that the language(s) adopted are capable of providing relatable examples to cover key CS concepts and methodologies and that they can find instructors proficient enough to deliver the necessary content. Many of these practical concepts will drive the language selection and therefor the natural bias of that next cohort of students, which can further skew this conversation...
  
  ## Why there isn't a single language?
  
  Whilst one *perfect* language might be a great idea, there are a lot of different competing opinions around what that *perfect* language might be, [Turing Completeness](https://en.wikipedia.org/wiki/Turing_completeness), though well accepted and established, is still just a theory and one of many opinions especially on how to very that the language is complete. ;)
  
  Before we try to create one *new* and *perfect* language, we would seek to find a way to incorporate some, if not all of the previous popular algorithms and abstractions that make each of the current languages *great*. But can such a thing be done, who would be responsible for re-writing the code from existing frameworks and languages, how do we determine which to bring across, who can be trusted to verify the completeness of this language?
  
  There are many *general purpose* programming languages that have been created in the past, and I'm sure we haven't seen the last of them. Typescript is an interesting example specifically of a higher order language that compiles into a lower order language *javascript* for execution in web browsers, we will probably see more of this type of evolution in the future because it deosn't require any additional effort from hardware or OS vendors. There are many theoretical benfits that TypeScript offers over javascript, I think we all agree that TypeScript has its place, but in a simple HTML page I can quickly use Javascript to satisfy many requirements it will run effectively natively in the browser without needing further compilation.
  
  What tends to rule the discussion is effort in the form of Time. Time is money, if I can use something to achieve an outcome quicker than other options, then using it might make me more money. So I will consider it.
  
  [@username_32 raises some excellently phrased points](https://cseducators.stackexchange.com/a/7187) but we need to recognise that programming languages are bound to commercial interests, whether that be the IDE, a storage or hosting platform or client end runtime framework or platform. As developers we are constantly fighting between what is theoretically "best" and what is a commercially viable or practical language for development for our particular client.
  
  The hardware or environments that code is deployed to can restrict the possible languages which will significantly contribute to the total cost of designing a solution. So regardless of our experience or language proficiency, we may come across a client that whose solution must be deployed to a very specific hardware or medium or that client may have their own
  
  Some hardware vendors have specifically designed their own languages either in an effort to protect their hardware or implementation IP or sometimes hardware/vendor providers are deliberately trying to create separate market verticals, sometimes driven from a greed/commercialisation point of view or sometimes as a deliberate legal avoidance technique.
  
  > Java was supposed to be the *killer* all purpose language, *MS Developer Studio* and early versions of *MS Visual Studio* even included support for variants of java (j++, j#). The variations were an evolution of the original java, enhancements to increase developer productivity and in part driven so they could integrate the complied assemblies with Internet Explorer to avoid some trust and operational constraints that were enforced from the official JVM runtime specification.
  >
  > Even before official complaints, MS were working on C# as a Java replacement that they could support and package directly in their operating system and browser products without being dependant on the language and JVM specification controlled by a competing commercial provider. MS were sued by Sun Microsystems because the MS java implementation was not 100% compatible with the java specification and as part of the settlement java support was dropped before the release of Visual Studio .Net.
  
  To properly answer the *why* we have multiple general use languages in the first place it might be helpful to talk to someone who has experience authoring multiple languages, [Mr. Anders Hejlsberg](https://microsoft.fandom.com/wiki/Anders_Hejlsberg) comes to mind as co-designer to many general purpose languages including *Turbo-Pascal* which replaced a previous general purpose language *Pascal*, *Delphi* and of course more recently *C#* and *TypeScript*.
  
  What I appreciate about Hejlsberg's designs is that he does not just focus on the language itself but he strikes a pragmatic balance between all stakeholders including the complier and interpreters. He puts a lot of energy into ensuring the tools, documentation and support libraries are provided and maintained to keep the language commercially viable.
  
  His engineering work is sometimes criticised as being in part derivative of other languages or attempts, but how many of us have truely original thoughts anyway? Hejlsberg applies an iterative approach as he continues to find ways to improve developer productivity.
  
  What is interesting is that changing hardware technologies and costs over the years means that what we want and expect from computers is evolving. As username_37 evolves some software driven algorithms get packaged into or replaced by hardware implementations, and some hardware implementations become more cost or energy efficient to be implemented in software. This means that the languages need to evolve to cater for these changes, over time you reach a point where there is no easy way to add a new fundamental extension to your language without contradicting, de-stabilising or rewriting all the previous rules and regulations. At that point, the next version, even if it has the same name or similar syntax, is probably a new language of its own.
  
  > **Comments:**
  > **username_5**: This is a well thought out answer!  
  > **username_51**: Your history of Microsoft's Java work is somewhat distorted. Java hit the development world by storm in the mid-1990s and Microsoft joined in. By the time Sun sued Microsoft, the Microsoft JVM was significantly faster than Sun's (and may have been the fastest), it was the most used JVM in the world, and by some accounts, the most compliant to the spec (but, because Sun controlled the the testing process, they never showed MSFT's compliance numbers).  Microsoft extended Java in order to make it interop with Microsoft's existing technologies and they didn't implement JNI - that was the complaint  
  > **username_50**: I learnt Java at Uni and was pro Java for a long time because the MSFT JVM was incredibly good. We all sense that Sun were worried about how MSFT were going to commercialise or profit from Java, especially with Visual Studio's growing popularity as an IDE. But the reason cited in the litigation was simply that MSFT compiled java and their JVM was not 100% compatible with Suns, so I wanted first to highlight how a legal confrontation between heavy weights was a contributing factor to how a really good candidate for a ubiquitous general-purpose language became superseded by another.  
  > **username_50**: @username_51 It is telling that the direct reason JVM, Java and variants were removed from Visual Studio was specifically part of the settlement with Sun, not as a derivative of the litigation, they were specifically told to remove it. I think the final nail in the coffin with the MS JVM was an anti-trust suit against it being distributed with IE but I can't find any   good references to back this up. (I have toned down my criticisms in the post, was not intentional)  
  > **username_51**: @username_50: it was in all the papers: https://www.cnet.com/news/sun-microsoft-settle-java-suit/. Sun's argument was that Microsoft's JVM wasn't compatible with the standard. Sun's advantage was they were the adjudicators of compatibility. Published independent reports showed that the MSFT JVM was as compatible as Sun's (IIRC) - except for the absence of JNI. Microsoft swapped in a COM & native Windows interop mechanism (using the standard `@` notation) to replace JNI. Sun somehow argued that no-JNI broke "write once, run anywhere". Note, by the time of the settlement, I was fulltime at Microsoft.  
  > **username_50**: Thanks @username_51 that's a good link and summary and pretty much what I was trying to paraphrase from a conceptual viewpoint, I just tried to dumb it down a bit, the details are not important to this discussion, just the fact that legalities around commercial interests are a very real aspect of the evolution of programing languages, even when the theory or conceptual ideas are sound, the practical implementation of a languages in a commercial environment mean we will probably never have one single ubiquitous language.  
  
  ---
  
  ### Answer by username_23 on 2022-01-04. Score: 4
  
  One more aspect:
  
  Every non-trivial software project uses its own, problem-specific language. So, there's literally millions of programming languages in use.
  
  How that?
  
  Bigger software projects always consist of multiple layers, where the lower-level (library) functions help to make the higher-level ones easier to write and understand.
  
  Designing software in layers effectively means to create (in the lower layer) the vocabulary you want to use in the next-higher layer, thus **creating the language you want to use for expressing your solution**.
  
  So, in a way, there are no two programs using the same language, as they all introduce lots of problem-specific vocabulary.
  
  With bigger software projects, knowing the base programming language (like C, Python or Java) is by far the less challenging task. Understanding the problem-specific vocabulary (classes, fields, methods, ...) plays a much greater role.
  
  So, why do we still have different base languages? Because we choose a language where the base concepts plus the available libraries provide a reasonably-good match to the problem-domain, so we don't waste precious resources on creating abstractions that would come for free with a different base language.
  
  > **Comments:**
  > **username_1**:  Ppl familiar with the ideas of Paul username_36's [On lisp](https://en.m.wikipedia.org/wiki/On_Lisp) will recognize how true is your observation.  One can (and as you say must for large enough systems) build the domain specific language in C, Python, C++ or what ever. Only lisp makes it pleasant and trivial  
  > **username_23**: @Rusi In fact, I've been using Common LISP as my main language from around 1987 till 2003 (switched mainly to Java afterwards), and it has deeply influenced my way of developing software.  
  > **username_5**: Interesting about domains and language. We humans seem to get stuck on defining nouns and verbs, but what is more important is *what you are talking about*. Data is important, code and language not.  
  > **username_1**: Heh! One lisper smells out another . I can hardly remember as much pleasure as Scheme gave me in the 80s. Ok a tie with Basic. And C close behind. It's strange how clueless the paradigm-pundits are about the sheer joy that a beautiful language can give. Oh, and the largest C I've written is a lisp implementation ... For which I would pore over the Steele common lisp bible. No and I did not come close to implementing CL   
  > **username_5**: Object Oriented Programming Systems (Oops!) make this idea of a custom hammer for every nail more explicit. Many people say it is an unhelpful approach, but many say it is indispensable. I guess it depends on how good you are at using (and selectively not using) the technique.  
  
  ---
  
  ### Answer by username_52 on 2022-01-03. Score: 3
  
  In many companies you standardize on one or a few languages. This saves a lot of time and effort and basically makes the whole operation more efficient. In the company you can have a "dictator" deciding on how to work (well not actually a dictator, but might be called software architect or similar).
  
  But you cannot order other people or other companies to use the same language. The US military tried with the language Ada, but failed to impose the usage of it on everyone. Ada is sadly just about dead now, sadly because it was/is a really good language and could have replaced all of C, C++, Fortran and Cobol and some other languages as well.
  
  One driving factor for using several languages is what type of program you are writing and where it will run and the restrictions this sets for your choice. For a very common type of application today, a web application, the programming often falls inte three different parts and then three different languages. As example, see a largish web shop (say, [www.thomann.de](http://www.thomann.de) )
  
  * One part of the application runs in you web browser: say Edge or Firefox or Safari. Today the only computer language they support is javascript. (They use the languages HTML and CSS as well, but these are not general purpose computer languages, more like document specifications).
  * The second part of your application runs on the computer server. Part is a standard web server (often Apache or IIS which you simply install as a function in your server). But the actual functionality you program in some language. It could be javascript (perhaps using nodeJS) or from a large choice of languages. Javascript is not very common from a number of reasons, you will probably find a mix of other languages used: Perl (early days of internet), PHP, Ruby (very good for some things), Erlang (very good for some things), C/C++ (good for some things). Often you knit together various components and frameworks in order to save developer time and get higher quality at a lower cost.
  * The third part of your application is often a database. Databases, especially when you have millions of customers and orders and product and so on, are often accessed using a program language called SQL. There is not much choice for you there as that is what databases uses (there are alternatives of course, but not in quite as widespread usage). SQL is great for accessing databases but totally useless if you try to run in the web browser (simply will not work).
  
  Could you even create one language for all different usages? Personally I say no! And even if someone did, a few years down the line people and companies would create and select other languages.
  
  > **Comments:**
  > **username_5**: My mother used to say that the best form of government is a benevolent dictatorship. Kind of like saying one time pad is the best 'encryption' method, this is indisputable, but not too practical also. But, some dictation in the form of standards and accepted methods would be beneficial just about now.  
  > **username_53**: “Today the only computer language they support is javascript.” –And WebAssembly. Which is of course almost never written directly by humans. And even JavaScript is often not written in JavaScript, but in another language that compiles to JavaScript. What _is_ possible though is to write both front- and backend code in e.g. Rust, Go or Haskell and compile the backend to server-native machine code and the front end to WebAssembly.  
  
  ---
  
  ### Answer by username_54 on 2022-01-05. Score: 3
  
  [username_32 and Ben](https://cseducators.stackexchange.com/a/7189/3168) offer logical explanations to the plethora of languages that exist. The ideas make sense, you need a better tool, you have a different niche. But languages don't exist solely because they work better than another language for a specific use case. There's a human element in there that makes things a whole lot less fun and a whole lot more arbitrary.
  
  For example, the list of languages Ben had, each are not the ideal language for their own use case, or exist in spite of other languages for not very nice reasons.
  
  ### Excel
  
  Excel's language is not the best for "short scripts" and is severely limiting compared to many dozens of languages, including python. For example, instead of having to execute statements hidden behind visual cells, it might make more sense to have a series of statements that refer to specific cells ie:
  
  suming an entire row.
  
  ```
  cell[row][col] = sum(cell[row][:])
  
  ```
  
  or sum an entire square subsection:
  
  ```
  cell[row][col] = sum(cell[row_start:row_end][col_start:col_end])
  
  ```
  
  If you want to do something like simple sum rows in a table if they meet a condition, that's near [incomprehensible](https://stackoverflow.com/questions/65508264/excel-how-to-sum-rows-in-table-a-if-they-meet-a-condition-in-table-b) in Excel's programming language:
  
  ```
  =SUMPRODUCT((ISNUMBER(FIND(UPPER("("&O$5:O$9&")"),B5)))*I$5:N$9)
  
  ```
  
  So clearly Excel's language is not the easiest or best choice for such a thing.
  
  The real reason Excel's language exists is because it already existed. Here's what I mean. The average users use case of Excel doesn't even include using the programming language directly, much less these summing routines. Using a better language doesn't make a lot of *business* sense, since it's relatively niche in the first place. What's more, if you change to an objectively better language for the job, you've also alienated your pre-existing customer base, many of which will be angry and stubborn attempting to stick to their inferior product, since they don't want to learn. You may be stuck supporting the "old way" regardless because of stubborn customers.
  
  ### C
  
  If we get to C, C doesn't exist because it is the best language for working with low level hardware/telling the hardware what to do. C doesn't even map properly to large swaths of different devices it's used on, it can't encapsulate ideas of paged ram that many pieces of hardware have (where you can't address pieces of memory directly, you must first execute a function to be able to address a place where a piece of memory resides). C often does extra work as well, because it doesn't have many compile time constructs, so you're often doing work at runtime that could be done at compile time, or using *another* language to generate C code which represents your compile time construct. C++, when you can use it, is objectively a better language for "mapping to hardware", it is a 99.999% superset of C and can do things faster, easier, and less error prone. But languages like Rust, are even better than that, as most functionality and many libraries are still available even after you remove the standard library.
  
  C is used because it already exists, and has a stable ABI. Now that ABI thing might sound like a "neat programming language feature", but really, it's another political thing. ABI, application binary interface, refers to how compiled programs interact with other compiled programs, calling functions from the assembly level in your code. If ABI's aren't stable, new versions of a language or compiler might cause previously working code, that was linked during runtime to another library, to no longer work. An ABI becomes stable when compilers agree not to change it. The only reason C's ABI is stable is people agreed not to change it. It's not because C is an elegantly written language, it's because people used it.
  
  C's niche today is for glue code because of it's ABI stability. Lots of other languages know how to talk with compiled C code because of this. C, because of its ubiquity, and how old it is, is supported by a wide variety of hardware. This makes it convenient when targeting low level code for the widest set of devices, but it isn't a feature of the language that made it so. Often it is used to boostrap OS's and programming languages because of this. Some platforms don't support C++ and rust because no one's bothered to write implimentations for those platforms for those languages. These languages are "more complicated" thus often it means that these other platforms don't want to put in the work to support them. But for C++ and Rust implementations relying on LLVM, or other 3rd party IR tooling, it's not because of the language at all, it's because the vendors don't feel like putting in the support for LLVM targets.
  
  ### Mathematica
  
  Mathematica is not a nice language to use for most programmers. It's really inefficient and the tooling ecosystem is entirely tied to wolfram products. It's not pleasant to use, and only appears "great" to a mathematician, because mathematicians don't want to learn programming languages, so you have to trick them into using the tools they actually need to use. There are some nice visual features, unrelated to the language itself, but as we see with python notebooks, this can be accomplished in basically any language if someone put forth the effort. So that's not a positive for the language itself. Mathematic symboligy is chronically overloaded to the point where even simple symbols, like the delta, can be confused within the same function for a multitude of different usages. Mathematic symboligy is not efficient for understanding with that respect. Some one wise once said:
  
  > "[Mathematic] equations are like code golf you're forced to read".
  
  The purpose of Mathematic symboligy is unfortunately not to for reading, but for easy writing and an "objective" symbolic set across language barriers. These equations are often written write and forget.
  
  Now others might tout mathematica's symbolic math power, and other utilities. The problem with this is that this isn't due to the language itself, but the libraries *linked behind it*. I emphasize linked, because you don't even write actual symbolic evaluation utilities in Mathematica itself, they wrote that in an entirely different language, and give you a simple interface to those utilities. If that doesn't speak to how bad the language is for it's own use case, I'm not sure what does. Unfortunately many of these implementations are non trivial, and the only thing that arguably rivals it, sympy, gets stuck with trivial symbolic equations. On top of that, because Mathematica is paid, they don't opensource these things, so better languages and ecosystems can't take advantage of the work they did on their inferior language.
  
  ### The myth that languages don't try to rule them all.
  
  So one more thing I'd like to point out, there *are* attempts to have "one language" languages, many languages have "converged" to have so many utilities that they serve extremely broad niches. One of the most famous and oldest examples, was Algol 60. It was supposed to be the successor to previous versions of Algol, and included a whole bunch of other programming paradigms inside of it. IIRC, it didn't have a successful compiler implemented for it, it was too big.
  
  But other languages have followed in its footsteps. C++ being a very very reminiscent example. C++ has expanded to include functional paradigms, imperative declarative. C++ has expanded to attempt to *actually* fill all possible niches, from low to high. Now, ignoring arguments of how well it's actually managed to do these kinds of things, C++ has basically run into the algol situation, as of C++20. C++20, in 2022, does not have a complete implementation. 2+years after the finalization of the standard, there's no compiler that supports *everything* in c++20.
  
  But another thing I'd like to mention, is metaprogramming. A very popular proposal to C++ would have added [MetaClasses](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0707r4.pdf) to the language, a facility that would have brought, implicitly many of the facilities found in C#/Java OOP, properties and many other features. I bring this up to bring up the tendency for large updated programming languages to have features meant to implement other features. Features that overlap heavily into what were the niches of other programming languages. C++ is not alone in this. In swift you can overload any operator, and it similarly has a powerful meta programming capability. In Python, you can modify the AST of the language itself at runtime, allowing you to implement powerful language extensions with out new compiler extensions or other advanced tools. In Rust, despite implementations of it being compiled, you can use macros to emulate almost every feature imaginable, though it will often slow compile time, as macros in rust work off of the abstract syntax tree.
  
  And there's often good reason for people not wanting to jump ship to another DSL for certain workloads. Each of the languages I've discussed, each has their own downsides their own major faults maybe acceptable to a select few people, but not acceptable to everyone. So people wish to stick to their own languages for all these facilities, and develop language features that enable them to do this. Tooling comes packed in with their own language already, and they don't have to worry about odd build system interactions either.
  
  ### Don't get me wrong, separate languages are still valuable.
  
  While there is a push in many large popular languages to be able to fill virtually every niche, there's still value to DSLs. A really good example of this, and probably the only really good example of this, is SQL. While SQL has a lot of dialects, SQL is independently compiled from your host program running the queries, and is very small, and allows you to more easily construct database queries and actions vs most native general purpose programming language.
  
  Now there are funnily enough a few issues with this view still, many programming languages *embedd SQL syntax into themselves*. C and C++ have tools that do this, Rust has libraries that have macros that sort of do this. Still the spirit of a DSL is still there.
  
  The other major issue is that SQL itself is... bad for a query language. In another example of not-the-best-tool being in use because people use it, SQL, and most of its modifications and derivatives, are arguable outclassed by [Datalog](https://en.wikipedia.org/wiki/Datalog), an modification to a language called prolog which was never meant to be a data base query language. That's pretty sad. One of the major culprits of the failures of SQL were the original designers at IBM of the language... who instead of using pre-defined [relational algebra](https://en.wikipedia.org/wiki/Relational_algebra#:%7E:text=In%20database%20theory%2C%20relational%20algebra,and%20defining%20queries%20on%20it.&text=The%20main%20premise%20of%20the,relations%20to%20an%20output%20relation.) and [relational calculus](https://en.wikipedia.org/wiki/Relational_calculus#:%7E:text=The%20relational%20calculus%20consists%20of,way%20to%20specify%20database%20queries.), formal mathematical models which had been in use for decades prior and unlike other "mathematical models" are much *simpler* than than what we practically use today, decided to just... not use them...
  
  ### TLDR
  
  * There's a big "i'm used to it" human factor to why some different languages exist, beyond and sometimes eclipsing the "fills a niche" argument.
  * The best language for a job is often not the most popular language for a job.
  * Languages may exist or be popular regardless if the language on its own merits is worth anything.
  * languages have large amounts of libraries nobody bothered to make elsewhere will often get them used above others.
  * languages are already established so people used them which causes people to use them more.
  * Tools (debuggers, linters, editors, package managers, builders etc...) matter, take time, and compound the previous statement regardless of how good a programming language is.
  * Some languages do actually try to do everything (C++, Algol 60, Python, Swift, etc...), in particular lower level languages often are able to find themselves able to embed zero cost abstractions that make them appear much higher level (iterators, static garbage collection, ownership), add features from different programming domains (functional, executors/declarative) which end up expanding to other programming languages domains.
  
  > **Comments:**
  > **username_5**: Gosh, you stumped me: I can't think of a witty comment for this long Answer!  
  
  ---
  
  ### Answer by username_48 on 2022-01-05. Score: 3
  
  There are a lot of great username_0 here which explain why it's *good* that there are so many different programming languages. But that's not exactly what you asked; you want to know why there *are* so many different programming languages.
  
  I think the answer to that is quite straightforward: programming languages are not actually that hard to create, and when username_46 designs a new programming language, they aren't thinking "I want there to be more programming languages", they are usually thinking "I want there to be *a* language *like this*". Besides the motivation to design an "ideal" programming language without the drawbacks and blemishes of earlier languages (in the language designer's subjective opinion, which of course differs from every other language designer's subjective opinion), it is actually quite fun to design a programming language.
  
  Sometimes a programming language exists simply because someone had [a funny idea](https://en.wikipedia.org/wiki/Whitespace_(programming_language)) for it at the pub. So it would be strange if there *weren't* thousands of the things out there!
  
  
  ---
  
  ### Answer by username_22 on 2022-01-05. Score: 2
  
  There is a conflict of interest between organisations and developers which I believe is partly responsible for the creation and adoption of new languages.
  
  Organisations would probably want a single universal language because it would drive salaries down.
  
  However an individual developer would be well advised to stay ahead of the curve and learn additional languages because it will improve their earning potential.
  
  
  ---
  
  ### Answer by username_23 on 2022-01-04. Score: 2
  
  One more aspect:
  
  Every non-trivial software project uses its own, problem-specific language. So, effectively, we have millions of programming languages in use.
  
  How that?
  
  Bigger software projects always consist of multiple layers, where the lower-level (library) functions help to make the higher-level ones easier to write and understand.
  
  Designing software in layers effectively means to create (in the lower layer) the vocabulary you want to use in the next-higher layer, thus **creating the language you want to use for expressing your solution**.
  
  So, in a way, there are no two programs using the same language, as they all introduce lots of problem-specific vocabulary.
  
  With bigger software projects, knowing the base programming language (like C, Python or Java) is by far the less challenging task. Understanding the problem-specific vocabulary (framework, classes, fields, methods, ...) plays a much greater role.
  
  So, effectively, the top software layer for a given problem will look very much the same, no matter what base language was chosen. Only, it's packed into the syntax of the base language. E.g. using Java syntax (but would look quite similar in C, C++, C# and a lot of others)
  
  ```
  Problem problem = readProblem();
  Solution solution = computeSolution(problem);
  writeSolution(solution);
  
  ```
  
  Even in an "exotic" language like LISP, you'd recognize the same pattern:
  
  ```
  (let* ((problem (read-problem))
         (solution (compute-solution problem)))
      (write-solution solution))
  
  ```
  
  You see, there's much more problem-specific vocabulary than base language in these lines of code.
  
  So, why do we still have different base languages? Because we choose a language where the base concepts plus the available libraries come close to the problem-domain. If we choose the wrong base language, we waste development effort (= money) for creating the vocabulary for the higher-level functions that come for free in other languages.
  
  > **Comments:**
  > **username_1**: It seems you have replicated your answer rather than correcting/editing it. better to merge this into that I think??  
  > **username_24**: If you're limiting the comparison to procedural imperative languages.  
  > **username_5**: Object Oriented Programming Systems (Oops!) make this idea of a custom hammer for every nail more explicit. Many people say it is an unhelpful approach, but many say it is indispensable. I guess it depends on how good you are at using (and selectively not using) the technique.  
  
  ---
  
  ### Answer by username_25 on 2022-01-04. Score: 2
  
  From a pragmatic (software engineering) perspective...
  
  The world is filled with pre-existing pieces of software, written in different languages. Even if someone invented a new "perfect" programming language overnight, all this existing code would not just automatically disappear. It would remain in use, and someone would need to maintain it. So the new "perfect" language would just be one more language in that heterogeneous landscape.
  
  Now, if that new language was so good, maybe people would like to translate existing code into the new language. Manual translation would usually be unthinkable (too much code!). Automatic translation might be a possibility, but would often result in the following:
  
  * automatically generated code may look "weird" and unreadable in places
  * some aspects of the original language might be impossible to translate automatically
  * existing code may be translated incorrectly, resulting in bugs
  * existing code may be translated correctly, exposing bugs! (original implementation may only work "by accident", because of some weird feature of the original language)
  * performance might not be as good. Or maybe too good?? (see above. Changes in time of execution can have unpredictible side-effects)
  
  Regarding the last point, consider hardware. Some languages are much "closer to the metal", others are much more abstract. Translation between "high-level" abstract languages running on powerful hardware is feasible (nevermind the potential loss of performance, or the extra resources needed, just increase your CPU and/or add more RAM). The same cannot be said of embedded software running on much more specific and limited hardware.
  
  Consider also the human factor: new language may be great, but existing programmers may find it tedious (and a risky investment of their time) to learn yet another new language. Hence the slow adoption. Also, more money might be made by specialising in maintaining all the old libraries...
  
  
  ---
  
  ### Answer by username_26 on 2022-01-05. Score: 1
  
  > One language is better.
  
  Unfortunately, no, it is not.
  
  A language is a tool with specific tasks in mind. We don't go around thinking that we only need a hammer, and we don't need to worry about pliers, screwdrivers or saws just because we have a good hammer (and it is a lot easier to learn how to use a hammer than using all those other tools.)
  
  > **Comments:**
  > **username_5**: To a kid with JavaScript, everything is a web page.  
  
  ---
  
  