可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
I was reading the post Why Language is Important (Why I prefer C#) from 'Dot Net Thoughts' and the first paragraph of the article ends with this statement:
...every language was created for a
specific purpose.
This got me thinking about exactly "why" certain languages exist...ie what is their specific reason of their existence.
My goal from this question is to list as many programming languages as possible and their main reason of why they exist...why they are used; and this will help people on deciding on what language to use for specific tasks.
Languages such as C#
, VB
, Haskell
, Eiffel
, Perl
, Python
, Java
etc; procedural languages, functional languages, object-oriented languages etc...
回答1:
Just my opinions:
C# - Microsoft wanted their own Java
Haskell - research of pure functional languages
Perl - text manipulation
Python - readable scripting language
Procedural languages - easy to compile for Von Neumann style architectures
LISP & Functional languages - help with bottom-up software design
Ruby - OO-Perl
Lua - Embeddable scripting language
C - Portable assembler
C++ - Portable assembler with objects
Emacs Lisp - Scheme or CL didn't have enough performance at that time
Pascal - Teaching programming. For some perverted reason people insisted using it for production software too.
Assembly languages - Writing machine language and resolving JMP addresses manually on paper is tedious. (I've tried it)
Power shell - replace BAT scripting
PHP - for making internets
Javascript - for making internets 2.0
APL - to make obfuscated coding contests obsolete
回答2:
Brainfuck exists to show you can write a compiler for a Turing complete language in under 200 bytes :)
回答3:
- Perl, because developers should learn to appreciate pain
- C++, because 5 people on the planet should be able to create Operational Systems and embedded systems and because D was too far into the alphabet
- C, because B needed a successor
- D, because C needed a "real" successor
- Python, because writing angle brackets are bad to your health
- Java, because C++ was too difficult and Gosling thought (falsely) that we needed a language without Multiple Inheritance
- VB, because Bill Gates' children needed "VB inheritance"
- C#, because Java started stealing market shares from "Visual C++"
But I guess that list might be controversial for some ... ;)
回答4:
PHP Originally stood for "Personal Home Pages" which says it all I think.
APL Stands for "A Programming Language" and was created for "teaching and analysis of topics related to the application of computers"
TCL Pronounced "Tickle" was "born out of frustration" by John Ousterhout and was meant to be embedded in other applications
Applescript Was a progression from Hypertalk for Appels HyperCard application and was, like TCL, designed to be embedded in other applications to facilitate scripting.
That's all. My Programming Language history isn't great.
回答5:
I think JAVA is the only language that was advertised with its purpose:
write once, run anywhere
回答6:
Python: A programming language that is easy to read and use.
APL: A language that is extremely good at solving mathematical problems.
J and K: Both are trying to make APL usable to people with qwerty keyboards.
Java: Made as a better C++, with focus on using a single codebase.
C++: Made as a better C with Object-Orientation.
(Qt: Whilst it is not a programming language, it does extend C++ that it's worth mentioning. Qt is a GUI toolkit, a database abstracter and many, many more things. It's also cross-platform.)
C: A better B (Seriously)
Objective-C: Apple trying to make a better C with Object-Orientation.
Perl: A language build to process text, but is now a widely used "scripting" language. It also builds on the idea of "there should be more than one way to do it."
Haskell: Experiment to make a completely pure functional language, with big emphasis on the functionality.
Lisp: Originally named List Processor. Today it's a language that pioneered many of the techniques that modern languages has. Lisp is a standard and not an actual language. Sometimes called "the programmable programming language".
Common Lisp: A common implementation of Lisp. It has many features that modern languages got, but also many features that modern languages haven't got.
Scheme: Designed to be the most pure language in existence. It's mostly used as research.
JavaScript: A scripting language based on some stuff that might be Java. Apart from the name, it has nothing to do with Java. It's used nearly exclusively as the scripting language of the web. JavaScript is based on the standard ECMAScript.
Lua: A scripting language with the goal of being a good scripting language. Useless for virtually everything else.
XML: Designed to be a way to make uniform data formats, primarily for exchange of data between platforms. Highly extendible, for example XHTML (web page) can embed SVG (Vector graphics) and MathML (Guess what) documents, giving XHTML near infinite possibilities.
CSS: Designed to style HTML and XHTML documents.
Esoteric Programming Languages: Languages designed to be confusing and hard to use.
Now, I can't really name any other languages, I hope it was useful :)
回答7:
I don't think that this is a useful statement. There are general purpose languages, and some languages that initially served a specific purpose have since grown to being rather general (e.g. Perl). Some languages are also perceived as being special purpose, even though they were general from the start (Lisp).
That article also shows a really narrow view of the programming language landscape.
回答8:
Well the most obvious one is COBOL:
Common Business Oriented Language
And you can see it by reading the sourcecode, too.
Python had mainly multi Paradigms and clear simplicity in mind (however one can always argue about that I'd agree).
回答9:
Fortran - to run numerical calculations as fast as possible.
回答10:
I think it's better stated to say that, "every language is best-suited for a specific purpose." Not every language was created with specific purpose, but there are usually a handful of domains in which it excels.
For example, "Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way." C and C++ are more common general purpose languages.
And now for a list of languages and what they're actually used for instead of just what people think about them:
PHP, ASP, JSP, Ruby, Python: Web apps (Haskell is starting to be considered here too [thanks Reddit])
Javascript: AJAX, DOM manipulation
BASIC, VB: Rapid prototyping, teaching
AWK: Text processing
C & co.: System (OS's, etc), application software, device drivers, embedded systems, server/client applications, etc/
Objective C: iPhone
Lisp, Prolog: AI
Erlang: Multi-threaded, parallel, fault-tolerant programming.
Scala, Haskell: Couldn't find any one clear thing, they both seem pretty general (I use neither).
Pascal: Teaching
Eiffel: Finance, aerospace, health, games and teaching (apparently).
R: Statistical computing and graphics.
回答11:
INTERCAL: To raise the perceived intelligence of developers by making their code so confusing no one else understands it. =:)
回答12:
Perl - The glue language for system administrators which has now grown to a general purpose programming language.
回答13:
I have to take this opportunity to mention to Piet, whose only design principle is: Program code will be in the form of abstract art. And yes, it's a real language, in the sense that there are interpreters for it, and a few working programs. Here's one that generates prime numbers:
a prime number generator written, I mean, drawn in Piet http://www.dangermouse.net/esoteric/piet/erat2.png
I once spent probably half an hour or so trying to draw a dinky little program that could determine if a number was even or odd.
回答14:
R language
For statistical computing.
回答15:
J
J is particularly strong in the
mathematical, statistical, and logical
analysis of data. It is a powerful
tool in building new and better
solutions to old problems and even
better at finding solutions where the
problem is not already well
understood.
回答16:
Ada - Designed by the Department of Defense for safety-critical embedded/real-time systems.