I'd really like to focus on why some new programming languages are adopted in the mainstream, and others remain relatively niche. I'd like to know about things like specific use cases, backwards compatibility, or some new features, simple or complex implementation difficulty. Specific examples would be appreciated, but let's not get caught up on the exact definition of "mainstream" or "niche" here.

5 Answers
5

BASIC is an awful little language that came with (all?) PCs when they first came out. The Apple II (the default computer for many high schools), and the ATARI 400/800 (the first super cheap home computer) both came with BASIC.

If you had a UNIX machine (either AT&T system V or Berkeley's) you had C. If you wanted to program the machine, that's what you had to use.

EDIT: With the advent and ubiquity of the 'net, this requirement transforms into:

How many Linux distributions package a recent copy and how well do they keep it up-to-date? Are third-party libraries similarly available for install?

Is it easily installed in Windows(XP|Vista|7,8...)?

Are Mac/iOS-platforms covered?

Can be it be installed without nuisance on legacy Unix?

And once installed, how easy is it to access third-party libraries, and can it be upgraded easily?

Ease of Transition

Java is a good example here. If you knew C programming, Java was not a very far jump ahead, and yet it gave many of the features that C lacked and C++ failed to provide cleanly.

C++ for obvious reasons was an easy step forward from C, and it was easy to sell to management as an "improved" C. C++ had the added benefit of being backward compatible with much of the existing legacy C code base.

Perl was an amalgamation of C, awk, sed, and other Unix utilities all in one bundle. Prior to its appearance, most system administration was done through shell scripts gluing everything together in an unsatisfactory way. Bringing everything under one process with the data structures and control of a C-like language was a godsend.

Fills a Need

C took off because it allowed you to produce close-to-assembly efficiencies without getting bogged down in the machine-specific, hard to maintain world of assembly.

FORTRAN took off because it allowed for easy translation of mathematical ideas into code without having to get lost in the details of the machine.

Likewise for LISP and symbolic manipulation.

Python grew out of the need for a "better" Perl. (I'm biased here, so I won't say more.)

PHP was essentially the BASIC for the web -- it was installed by default on many web servers, and it was easy to hack together something useful quickly.

Advocacy, User-base, Contributed Code

Let's face it, Haskell would not be anywhere as popular as it is for a not-in-production language if it weren't for the tireless advocacy of its developers and user base.

Many languages have a cult-of-personality behind the language's creator(s), and we all know who they are.

FORTRAN has huge sets of established and vetted mathematics code; same for Java and the web/systems-integration/MVC-systems; same for Perl and CPAN; same for TEX and document management; etc.

The It Factor

For some reason some languages just seem to have the right amount of new, with enough of a nod to the old, with a way that makes it seem easy or needed. That is, it makes its own case. And who knows just how this happens?

Anyway, that's my best guess for why some make it. As for why some don't... well, if they don't meet the above criteria, that's probably why they failed.

The determining factor in most of your criteria is corporatebacking. Java may have scored for, e.g., ease of transition, but without someone willing to blow millions on it, year in year out, as part of their world domination plan, it's not clear what difference that would have made. So, you're right, the very rich do know the answer to this :-)
–
jaybeeJul 11 '11 at 14:26

4

@jaybee - not sure that corporate backing by the language creators necessarily helped. Fortran and C weren't particularly helped by coming from IBM/ATT. The Oracle link seems to be actively harming Java. Basic, Perl, Python, Ruby etc all had no corporates behind them. Internal corp support at the user/customer is important but that follows long after it becomes ubiquitous.
–
Martin BeckettJul 11 '11 at 15:21

1

@Martin Beckett: you may have a point. I do think though that although all sorts of planets may need to be aligned for a language to get to critical mass, the "modern" way to chivvy those planets into line seems to be to burn cash. E.g. Mark uses Haskell as an example -- it may have a great, vocal user base but GHC wins a lot of arguments for them. Compilers like GHC cost money.
–
jaybeeJul 11 '11 at 15:55

@jaybee - there is a lot of luck. But for cool new web languages it may well be the marketing skill of the creator/early adopter that's what matters.
–
Martin BeckettJul 11 '11 at 16:24

Languages becomes popular because they have an advantage over existing languages in an area that is needed.

Java

Automatic memory management (compare with C++ and C)

Language/API built in Threading

Runs on a virtual machine (that means the developers can use Windows on development machines for testing and deploy the application without modification on Linux/Unix).

Network programming is much easier than in the languages that was most popular before (C++ and C) and Java was released when Internet started to be popular.

PHP

Made web development easy

Built in support for connecting to MySQL databases

No compilation needed and it was easy to include the scripts right into your HTML-files.

JavaScript

The only language for web browsers.

Web browsers are used more and more as thin clients (web applications).

Mobile code - easy to deploy and no installation

Objective-C

The language for the Mac OS X environment and iPhone. And iPhone has been a huge success.

Ruby

Together with Ruby on Rails - a web framework, made large scale web-development much easier with MVC.

C#

The language for Windows environments the last ten years. Almost all Microsoft APIs is easy to use with C# e.g. Winforms and WPF and WCF.

ActionScript

The only language for Addobe Flash/Flex, which has had a huge success for media content on Internet and things that JavaScript couldn't handle.

Erlang

Concurrency & Fault tolerance - Erlang had a unique model for doing concurrency and frameworks fault tolerant systems. Started to be useful for the Telecom industry, later open sourced and get interest from large Internet companies that also needed fault tolerance.

Erlang's concurrency model is not unique, its just different from that used by the ugly imperative languages :). Scala has the same type. Similarly, Clojure and Haskell specialize in STM.
–
alternativeJul 10 '11 at 22:23

3

@mathepic: True, but all those languages are newer than Erlang. So it was unique for Erlang in the beginning - as with almost all laguage features I have listed. Good ideas is worth stealing.
–
JonasJul 10 '11 at 22:25

1

C# is the .net language. I thought windows was actually written in c++. Am i wrong on this. I would say C# became popular by leveraging a language people already knew (C) with a new framework that made developing powerful applications easier with a editor tool that was powerful, easy to use, and took developers needs and actual use into account.
–
ChadJul 11 '11 at 14:04

@mathepic - I have worked on C, C++ and C# programming. I can say that C# Still retains its c roots as far as nomeclature. Granted it has gone beyond C that does not mean that it does not leverage the language.
–
ChadJul 11 '11 at 14:28

C# and Obj-C aren't so much supported as "mandated" by. It's difficult to program windows apps in c++ with only MSFT supplied apis, and AFAIK only obj-C is allowed on at least apples mobile platforms. On the other hand Oracle's sueing of Android makers could harm Java
–
Martin BeckettJul 11 '11 at 15:25

1

@Martin - You're largely correct WRT Obj-C. Technically, you can use things like Appcelerator Ttanium to use other languages to write the apps, but it still gets converted to Obj-C for deployment (and it was a fight for them to get even that). Apple will ban just about anything else (even PhoneGap has walked a fine line).
–
ShaunaJul 11 '11 at 17:16

On one hand it is marketing, more precisely presentations, blogs etc. It is important to have features that mainstream programmers can relate to and see benefits over what they know (Java vs. C++ - garbage collector vs. memory management). Last, but not least is to have low entry barrier - examples, good documentations, seamless install, good community and support, vibrant development.

Almost all the languages had non-trivial, real-world problem solving programs written using them very early in their life.

Unix was written in C, so were the tools on Unix, when C was very young and evolving.

Anaconda (RedHat's installer program) was written in Python when Python was young and did not have the popularity of today.

These are what I can recall off handed. This list could touch each of the languages that has survived its formative years.

Then, large scale adoption in the universities can help a language's longevity. Java is very popular at universities as a teaching language. To some extent, Lisp and dialects of Lisp enjoy this status too.