Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Take this scenario:

  • A programmer creates a language to solve some problem.

  • He then releases this language to help others solve problems like it.

  • Another programmer discovers it's actually much better for some different category of problems.

  • By virtue of this new application, the language then becomes popular for that application primarily.

Are there any instances of this actually occurring?

Put another way, does the intended purpose of a language have any bearing on how it's actually used, or whether it becomes popular? Is it even important that a language have an advertised purpose?

share|improve this question
4  
Your HTML example doesn't really seem to fit with what you are looking for, are technical documents so different than any other document? HTML's core purpose is still the same as it was in 1989, to provide easy means for documents to reference each other. IMHO HTML is the exact opposite of what you are actually looking for. – Yannis May 30 '11 at 8:13
5  
Considering the long list of answers; maybe the opposite question is more interesting: what (popular) language is just used for it's intended purpose? – Jaap May 30 '11 at 15:13
    
@Yannis: Good point. It's not the best example, and could really be argued either way. Edited to remove. – Jon Purdy May 30 '11 at 18:15
    
@Jaap: I thought the same! – leonbloy May 30 '11 at 20:47
2  
I could be wrong in this but I'm pretty sure most languages aren't used for what their creators intended. I think the large reason for this is that outsiders don't know what it's supposed to be used for which helps them to be more open-minded about the potential a language has. – Kenneth May 30 '11 at 21:42

19 Answers 19

up vote 117 down vote accepted

Lisp. McCarthy originally specified Lisp in a paper to show that few simple notations are enough to build a turing complete language. He was surprised to find that Lisp could be implemented in machine code (Steve Russel did the first Lisp interpreter implementation). Lisp is widely used for AI programming.

share|improve this answer
69  
+1, Lisp was not intended to be a programming language! I don't think you can top that. – Kilian Foth May 30 '11 at 8:56
6  
OTOH, one could argue that LISP was designed for use at the border between programming and math, and it remains there. – MSalters May 30 '11 at 9:43
1  
I believe McCarthy used Lisp as an example in his classes and intended to write a compiler for it, but mentioned in class one day that hand-coding the eval function would implement an interpreter but of course 'no one would actually want to do that' – Steven A. Lowe May 30 '11 at 16:26
    
My Lisper friends tell me it's not used in AI so much any more, but it still has application everywhere. – greyfade May 30 '11 at 20:47

Java was originally intended for embedded systems programming. From Wikipedia "Java was originally designed for interactive television". But it became hugely popular for Application and Web programming.

share|improve this answer
3  
Huh. Can't believe I didn't think of this one. It's arguably the canonical example...though that's not to say I won't yet be surprised. – Jon Purdy May 30 '11 at 6:28
    
Although, was Java ever actually released for embedded work (before embedded java, which came rather after its promotion for the web)? – Marcin May 30 '11 at 12:54
    
The crucial design element in the design Java was the ability to run untrusted code. – user1249 May 30 '11 at 18:24
12  
the story is even worse: A) it was intended for embedded systems. B)but never saw the light until it could be embedded in webpages. C) it didn't get any respect until used for 'enterprisey' web applications and D) it finally got embedded in many phone OSs; but not as a hardware controller, it's a GUI platform instead. – Javier May 30 '11 at 19:47
    
There has been a project to get it onto set-top boxes for more than 10 years now--look up OCAP or tru-2way – Bill K May 31 '11 at 5:58

Lua was designed primarily as configuration language, and ended up finding a niche as the most popular scripting language for games (because it's small, fast, powerful, portable, easily extended and embedded, with user friendly syntax). The most popular game to use it, World of Warcraft, doesn't even really use it for configuration, using XML instead.

share|improve this answer
    
...and now with LuaJIT it's finding more and more use in real-time processing applications – Javier May 30 '11 at 19:50
1  
    
@lukas: "Not really" what? Note that it's predecessors, SOL and DEL, didn't even have control flow, they were purely configuration languages. Lua was the extension of those configuration languages to include programming support. – Mud May 30 '11 at 22:37
    
"Lua was designed primarily as configuration language" I would say as a programming language. – Lukasz Madon May 30 '11 at 22:55
6  
Perhaps I should have said "intended purpose" rather than "designed primarily as". The intended purpose was to use Lua where SOL and DEL were being used. These were configuration languages that users were starting to demand programming features in. Lua was created to fill that need. As the authors themselves have stated, "The wide adoption of Lua in games came as a surprise to us. We did not have game development as a target for Lua." That's pretty much exactly what the OP was looking for, no? – Mud May 30 '11 at 23:23

Larry Wall's original intention for perl was for a "general-purpose Unix scripting language to make report processing easier" and the man page describes the language as:

Perl is a interpreted language optimized for scanning arbitrary text files, extracting information from those textfiles, and printing reports based on that information.

And of course the man page also tells us that Perl stands for Practical Extraction and Report Language (the actual name is a misspelling of the original name Pearl, changed when Wall discovered an already existing PEARL language).

Perl went a long way since then, as it is the language from which the gods wrought the universe.

enter image description here

share|improve this answer
22  
One should correct that: Pathologically Eclectic Rubbish Lister – Richard May 30 '11 at 9:42
3  
There is more than one way to unabbrev! Very Perly – user1249 May 30 '11 at 16:44
    
Any acronym for Perl is actually a backronym. – CanSpice May 30 '11 at 19:26
1  
@DarkTemplar The way I interpret it is that perl has crept it's way almost everywhere. From it's humble beginnings perl grew to be a very popular web language, an extremely popular scripting language, a somewhat popular multi purpose language, its regular expression syntax become something of a definitive, gave birth to another language (php) etc. Plus the comic also references lisp, which is the accepted answer to the question, so I thought it was a fun (albeit inaccurate) depiction of the relation of the two languages (one is the dreamy one, the other the one people actually use). – Yannis Nov 22 '11 at 3:24
1  
@DarkTemplar Yeap. It's in the top ten in the TIOBE index. Of course you souldn't take TIOBE index very seriously, it's quite relative and subjective. But still a good indication of language popularity. – Yannis Nov 22 '11 at 8:03

I would guess that JavaScript fits into this question as well because I don't think that Brendan Eich, back in the Netscape days, ever imagined that future versions of his LiveScript would be used to create today's so called web "applications".

JavaScript has moved from simple form validations and image rollovers to a powerful tool that's able to rival offline applications, both in terms of functionality and beauty.

Unfortunately though, I think many still see regard it as a toy.

share|improve this answer
31  
The interesting thing is that it is moving towards being the assembly language of the web. In other words, what other languages are compiled down to and executed in. I don't believe Brendan Eich expected that. – user1249 May 30 '11 at 18:25
3  
have something to add: It is not just a client-side scripting language. Many projects like node.js or rhino use javascript as a server-side language – gion_13 May 30 '11 at 19:08
    
Just curious, but what is a "client-side scripting language" vs. "server-side language".......? – Dark Templar Nov 22 '11 at 7:46
    
@DarkTemplar. A server-side scripting language is run on the server and its output is sent to the browser. A client-side scripting language is sent to the browser as-is, and run there. (Of course, the server-side language can be used to output the client-side language, if you want.) The only language which runs in most browsers is javascript. – TRiG Feb 27 '12 at 22:31

Erlang. It was invented a long long time ago in Ericsson labs to develop telephony applications, probably for their lines of switching and access devices. Now it has evolved into a promising general purpose dynamic language with an interesting concept of concurrency.

It would be interesting if in the future there would be more languages from the telco world crossing their lines to IT world and evolve from there, esp languages those initially designed for modeling and verification of protocols.

share|improve this answer
    
+1 Interesting answer! Never heard of Erlang before – Dark Templar Nov 22 '11 at 7:47
    
And wasn't it one of the inspirations for node.js? – dodgy_coder Apr 15 '12 at 12:35

Pascal. Created to teach programming.

share|improve this answer
3  
Heh, that explains a lot… – poke May 30 '11 at 12:22
2  
@poke: Of curse, I know. – Nerevar May 30 '11 at 12:24
    
Hehe, I see what you did there. – Trufa May 30 '11 at 13:08
    
Hey, can someone please explain this answer? Lol. I'm a noob! – Dark Templar Nov 22 '11 at 7:46
    
@Dark Templar: taoyue.com/tutorials/pascal/history.html – Nerevar Nov 22 '11 at 10:42

PHP originally meant Personal Home Page, but today is used for a few slightly bigger web applications as well.

share|improve this answer
18  
of course, the biggest PHP user, Facebook, is in many ways still in the personal home page market. – Jaap May 30 '11 at 15:03
3  
"PHP/FI was created by Rasmus Lerdorf in 1995, initially as a simple set of Perl scripts for tracking accesses to his online resume." It's come a long way, baby. – nickf May 30 '11 at 15:30
    
Whilst PHP is still very much a Web language, it's undergone a bit of a role reversal: PHP was meant to be embedded as small snippets inside HTML, whereas many projects now generate HTML strings within PHP. They still need a <?php tag at the start of the file though! – Warbo Sep 21 '15 at 23:43

Initially designed as a method of making code more generic, Template Meta Programming in C++ was found out to be turing complete, and to this day is used to greatly improve the C++ language through libraries like boost.

share|improve this answer
7  
... and to bring C++ programmers to tears with excessively long build times ;-) – quant_dev May 30 '11 at 20:38
7  
and horrific error messages. – DeadMG May 30 '11 at 22:13

I'm quite sure that VBScript wasn't meant for writing malware, even though that is an extremely common use for it.

share|improve this answer
1  
Thats a bit harsh don't you think. Java and C have had their fair share of malware. – J Child May 30 '11 at 23:07
    
@JChild: Several years have passed since your comment. Even then, however, defending VB was a very strange thing to do. – Magus Mar 27 '14 at 22:54
    
@Magus It's not even VB. It's VBScript. You know, the files with .vbs extensions. The ones that you automatically assume are viruses when you see them. – user16764 Mar 28 '14 at 3:54

BASIC is another famous case. It's name (Beginner's All-purpose Symbolic Instruction Code) hints at its origin as a learners language, but it's grown quite a bit since.

share|improve this answer
24  
heh - microsoft replaced "beginner's" with "business" and suckered in millions – Steven A. Lowe May 30 '11 at 16:27

VHDL and Verilog (a.k.a. VerilogHDL) were originally intended to describe digital circuits and components. They were used as a form of documentation and to simulate the behavior of the components. Later, Synopsys and others developed technology that could translate (a subset of) these descriptions into a net lists of gates, which can in turn be used to produce real hardware.

VHDL and Verilog are called Hardware Description Languages (HDLs) for historical reasons. Today they are actually used as hardware design languages (same acronym).

share|improve this answer
    
Nice, real-life model driven development – Jaap May 30 '11 at 19:05
    
@Mark Yes, VHDL is very-high-speed integrated circuit, hardware description language. Verilog is a completely different language. Verilog is sometimes also called Verilog HDL. en.wikipedia.org/wiki/Verilog – Philippe May 31 '11 at 10:20
2  
QHDL is very similar to VHDL and is used for describing circuits for quantum computers. I can't imagine a language departing quite so far from its origins. – Mark Booth May 31 '11 at 11:21
    
@Mark Wow, that's interesting "QHDL"! Google shows a lot of noice. Do you have a reference? – Philippe May 31 '11 at 11:47
1  
I found out about it at Paul Blacks excellent "Quantum Computing for Programmers" session at the ACCU 2011 conference. His slides are at accu.org/content/conf2011/… – Mark Booth May 31 '11 at 12:06

ML started as a language for developing and scripting a theorem prover. It was the theorem prover's "meta language".

share|improve this answer
    
Alright. It's worth noting that the reason this is a valid answer is that its primary application is now compilers and other such language tools (at least as far as I know). – Jon Purdy May 30 '11 at 7:10
6  
+1, but saying that ML became "greatly popular" is a bit of a stretch – nikie May 30 '11 at 10:26
    
Perhaps, but in addition to its direct users today, it influenced just about every single typed language that came after it. – Ryan Culpepper May 30 '11 at 11:52

C
Originally it was originally developed for use with the Unix operating system. But the Language became so popular even Dennis Ritchie was surprised.
In his famous book The C programming language. Ritchie states "it has spread far beyond its origins as the language of the UNIX operating system." and how surprised he was as it became popular language for application development.

share|improve this answer
11  
Well, it was originally designed to develop systems and low-level applications in a cross-platform fashion. It remains consonant with its original goals despite its popularity, so it doesn't fit. – Jon Purdy May 30 '11 at 6:40
2  
@Jon Well it kind of fits, as it outgrew it's purpose by becoming the easiest way to shoot yourself in the foot. – Yannis May 30 '11 at 6:47
1  
@Yannis: Haha, true. But I'm asking about languages whose primary purpose changed utterly, not those which simply grew to encompass more purposes. – Jon Purdy May 30 '11 at 6:51
    
I would add that C became popular as one of the prime languages for obfuscated code contests. – Peter G. May 30 '11 at 16:45
    
Wasn't it designed to implement the operating system? – Nikko May 31 '11 at 8:56

C++ was originally designed as “C with classes” to facilitate object-oriented programming in C++.

Templates were then provided in a later version to enable the implementation of strongly-typed container classes. It was only noticed later that these templates actually constitute a Turing-complete compile-time programming language.

As a consequence, many applications now use C++ not as an object-oriented programming language but rather as a algorithms-driven programming language that relies heavily on compile-time polymorphism and metaprogramming.

share|improve this answer
7  
But the C++ is designed to be general purpose, and is used as a general purpose language. – BenjaminB May 30 '11 at 13:55
    
@Ubiquité I don’t think C++ really was designed as a general purpose language. Or rather, it was designed to be used for different purposes (but in particular systems programming). But it was not designed to work with multiple paradigms. – Konrad Rudolph May 30 '11 at 14:00
    
Actually, the multi-paradigm nature is inherent in its design, simply by virtue of bolting OO features onto C while retaining the ability to use its more procedural features where appropriate. – Jon Purdy May 30 '11 at 18:13
    
@Jon OK, I’ll concede that. However, generic programming and template metaprogramming weren’t among these features. And nowadays C++ is one of the only (and arguably the main) language that supports these features. – Konrad Rudolph May 30 '11 at 18:46
    
Very true. Hell, support for generic programming and const are the two most important reasons I use C++. – Jon Purdy May 30 '11 at 18:49

ADA — originally designed under DoD contract for avionics. Although still used in that application, it's also popular for example for real-time business middle-ware.

share|improve this answer
5  
It was build as a general purpose language. The DoD wanted a language usable for everything, to reduce the amount of different language used. – BenjaminB May 30 '11 at 13:54
    
That's pretty hilarious. Ada was a language explicitly created with the goal of reducing the number of different languages out there. By that metric ("designed with one purpose, used for another") Ada should be voted up to the top of the list with Lisp, another anti-language language. – Jared Updike Aug 18 '11 at 18:32

"does the intended purpose of a language have any bearing on how it's actually used, or whether it becomes popular?"

I don't think the intended purpose of a language has much bearing on its actual use and popularity: There are some great languages that were designed from the start to be innovative, flexible and versitile, but never became that widely used or popular except in very specialized vertical markets - for example Eiffel. OTOH, Basic, Pascal, C etc etc dominated the landscape for years although they were designed originally for limited, specific purposes.

IMO Marketing/financial and support considerations have always played a major role in the spread and extension of certain languages. For example: Borland comes up with TurboPascal and packages, markets and supports it. MS comes up with C# and packages, markets and supports it. As a result, these languages became popular, third party tool industries sprung up and more and more developers and enterprises jump on the bandwagon.

But for the last few years, openSource languages and tools are changing the dynamic and languages now become popular based more on 'merit' than marketing - for example Ruby, Python and Perl. But that's not because of the 'intent' of the inventors so much as the language's built in potential for extension and expedient usage.

share|improve this answer

I don't think there is a popular language that has not been repurposed from it's original intent. Even C was originally written to make a portable OS (unix).

Any attempt to write a truly generic programming language with no specific target in mind would probably fail miserably due to a lack of restraint and focus.

share|improve this answer
    
postscript - is ubiquitous (in almost every computer and printer), but only used for printing graphics. Although, one could argue that it was repurposed when used within pdf's. – 13ren Jan 3 '12 at 5:39

I've heard Ruby was designed as a language to write poetry in, turned out you can write pretty beautiful code in it as well!

I’ll be straight with you. I want you to cry. To weep. To whimper sweetly. This book is a poignant guide to Ruby. That means code so beautiful that tears are shed. That means gallant tales and somber truths that have you waking up the next morning in the arms of this book.

share|improve this answer
2  
Sounds... interesting. Any source? – Anto May 30 '11 at 18:28
    
The Ruby link takes you to a book that was written to teach Ruby in an artistic way. My answer is a joke in reference to that book which asserts writing Ruby is like poetry. In reality one might say that Ruby was designed to be a general purpose programming language but it inspired (some) people to look at Ruby code as poetry. – Tinco May 30 '11 at 22:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.