Comparison of programming languages: Difference between revisions
iso standard for eiffel |
fixed |
||
Line 171: | Line 171: | ||
| safe |
| safe |
||
| nominative |
| nominative |
||
| {{yes: ECMA-367, and ISO/IEC 25436:2006 |
| {{yes}}: ECMA-367, and ISO/IEC 25436:2006 |
||
|- |
|- |
||
! [[Erlang programming language|Erlang]] |
! [[Erlang programming language|Erlang]] |
Revision as of 17:26, 28 January 2008
Programming languages are used for controlling the behavior of a machine (often a computer). Like natural languages, programming languages have syntactic and semantic rules used to define meaning.
There are thousands of programming languages[1] and new ones are created every year. Few languages ever become sufficiently popular that they are used by more than a few people, but many professional programmers use dozens of different languages during their career.
General comparison
The following table compares general and technical information for a selection of commonly used programming languages. See the individual languages' articles for further information. Please note that the following table may be missing some information.
Usage
Language | Intended use | Design goals |
---|---|---|
ActionScript 3.0 | Web design | |
Ada | Embedded, Realtime applications | Reliability |
ALGOL | Application | Readability, Structure |
APL | Data processing | Terseness, Expressiveness |
BASIC | Educational | Simplicity |
BLISS | System | Type free |
Boo | Application | Python-like syntax, extensibility |
C | System | Low level access, Minimal constraint |
C++ | Application, System | Abstraction, Efficiency, Compatibility |
C# | Application | Rapid application development |
Chrome | Application | Extends Object Pascal to work on .NET |
Clean | General | Correctness, Modularity |
COBOL | Business and Financial Applications | Readability |
ColdFusion | Web Development | Rapid Application Development, Ease of use |
Common Lisp | General | Standardize Lisp |
D | Application, System | Compilability, Correctness, Compatibility |
Eiffel | Application | Correctness, Efficiency, "Design by contract" |
Erlang | Telecom and distributed applications | Fault tolerance, Scalability |
F# | Application | |
Forth | Application, Embedded systems | Compact implementations |
Fortran | Scientific and numeric applications | Runtime efficiency, Simple syntax |
GraphTalk | ||
Groovy | Application | JVM compatibility |
Haskell | Educational | Side-effect free |
Io | Application, Host-driven Scripting | |
J | Data processing, General Programming | Terseness, Expressiveness, Powerful Data Manipulation |
Java | Application | "Write once run anywhere" |
JavaScript | Client side web scripting | |
Joy | Functional programming research | Concatenative |
Lisp | General | Simple notation for Lambda calculus, Homoiconicity |
Lua | Host-driven Scripting | |
Mathematica | Numeric computation and visualization | |
Oberon | Application, Type-safe systems programming | Simplicity, safety and efficiency |
Objective-C | Application | Smalltalk like, Component based code reuse, C compatibility |
Objective Caml | Application | Efficiency, Robustness, Correctness |
Object Pascal (Delphi) | Application, System | Readability, Rapid application development, Modularity |
Oz | Educational | Multi-paradigm |
Pascal | Application, Educational | Readability, Discipline, Modularity |
Perl | Text processing, Scripting | Terseness, Expressiveness |
PHP | Web Application, CLI | Robustness and Simplicity |
Prolog | Problem solving, Artificial intelligence | Declarative programming |
Python | Application, Educational, Scripting | Simplicity, Readability, Expressiveness, Modularity |
Ruby | Application, Scripting, (Good Web Support) | Expressiveness, Readability |
S-Lang | Application, Numerical, Scripting | Small footprint, Embedded, Fast Numerics |
Scala | Educational | |
Scheme | General, Educational | Minimalistic, Lexical Scoping |
Smalltalk | Application, Educational | Uniformity, Pure object oriented |
SNOBOL | Text processing | |
Tcl | Application, Scripting | |
Visual Basic | Application | Rapid application development, Simplicity |
Visual Basic .NET | Application | Rapid application development, Simplicity |
Windows PowerShell | Automation, Scripting | |
XL |
Expressiveness
Language | Statements ratio[3] | Lines ratio[4] |
---|---|---|
C | 1 | 1 |
C++ | 2.5 | 1 |
Fortran | 2.5 | 0.8 |
Java | 2.5 | 1.5 |
MS Visual Basic | 4.5 | ? |
Perl | 6 | 6 |
Smalltalk | 6 | 6.25 |
Python | 6 | 6.5 |
The literature on programming languages contains an abundance of informal claims about their relative expressive power, but there's no framework for formalizing such statements nor for deriving interesting consequences.[5] This chart provides two measures of expressiveness from two different sources. An additional measure of expressiveness, in GZip bytes, can be found with the Compare to tool on the The Computer Language Benchmarks Game.
Benchmarks
Benchmarks are designed to mimic a particular type of workload on a component or system. The computer programs used for compiling some of the benchmark data in this section may not have been fully optimized, and the relevance of the data is disputed. The most accurate benchmarks are those that are customized to your particular situation. Other people's benchmark data may have some value to others, but proper interpretation brings many challenges. See this page about flawed benchmarks and comparisons. The Computer Language Benchmarks Game site contains a large number of micro-benchmarks of reader-contributed code snippets, with an interface that generates various charts and tables comparing specific programming languages and types of tests.
See also
- Alphabetical list of notable programming languages
- Program Chrestomathy
- Programming language
- Comparison of basic instructions of programming languages
References
- ^ As of May 2006 Diarmuid Pigott's Encyclopedia of Computer Languages hosted at Murdoch University, Australia lists 8512 computer languages.
- ^ Language changes are done using a formally documented procedure, starting with a Python Enhancement Proposal (PEP)s. Python version releases are accompanied with a Language Reference Manual showing syntax and semantics; a reference implementation, and test suite. These are used to generate other Python implementations such as Jython and IronPython
- ^ Data from Code Complete. The Statements ratio column "shows typical ratios of source statements in several high-level languages to the equivalent code in C. A higher ratio means that each line of code in the language listed accomplishes more than does each line of code in C.
- ^ The ratio of line count tests won by each language to the number won by C when using the Compare to feature at http://shootout.alioth.debian.org/debian/c.php. Last updated May, 2006. C gcc was used for C, C++ g++ was used for C++, Fortran G95 was used for Fortran, Java JDK Server was used for Java, and Smalltalk GST was used for Smalltalk.
- ^ From On the Expressive Power of Programming Languages, Matthias Felleisen, ESOP '90 3rd European Symposium on Programming.
External links
- 99-bottles-of-beer.net One program in over a thousand variations and multiple languages.
- The Computer Language Benchmarks Game at Alioth
- Language Study — Syntax across languages.
- Programming Language Comparison — A comparison of nine programming languages and related information.
- Computer Language Shootout Scorecard — Comparison of benchmark results for dozens of languages.
- Scriptometer scores — Multiple comparisons of 26 programming languages.
- Are Scripting Languages Any Good? A Validation of Perl, Python, Rexx, and Tcl against C, C++, and Java — PDF — 2003 study
- An empirical comparison of C, C++, Java, Perl, Python, Rexx, and Tcl — PDF — March 2000 refereed journal paper
- An empirical comparison of C, C++, Java, Perl, Python, Rexx, and Tcl for a search/string-processing program — PDF — March 2000 technical report (same author, experiment, and data as above, but has additional analysis and charts)
- ABAP2Java.com Comparision and Translation of ABAP and Java
- Comparing Web Languages in Theory and Practice — PDF — Research to fulfill Kristofer J. Carlson's master's degree requirements.
- The Encyclopedia of Computer Languages — As of May 2006, the encyclopedia lists 8512 computer languages with 17837 bibliographic records featuring 11064 extracts.
- PLEAC Programming Language Examples Alike Cookbook.
- The hundred-year language by Paul Graham. Keynote from PyCon2003 (about Python): how languages evolve and what increase in CPU speed might bring us.
- TIOBE Programming Community Index The TIOBE Programming Community index gives an indication of the popularity of programming languages.
- OHLOH Language Statistics The programming languages page on Ohloh gives an actively updated indication of the popularity of programming languages in open-source projects.
- Comparison Cheat Sheet between Languages --seems to be down