Home Experiments Computer Science Fair Projects Computer Fair Books Computer Sciences Resources Computer & Internet Jokes Warning!
 
 


Comparison of Programming Languages
Background Information
For Science Labs, Lesson Plans, Class Activities & Science Fair Projects
For lementary, Middle and High School Students and Teachers




 


Experiments Home
Computers
Programming Languages Comparison




Computer Science Fair Projects Home

  • Hardware
  • Software
  • Internet & Security
  • Robotics & (AI)
  • Graphics
  • Electronics

















  • Scientists and Inventors

    Scientists and Inventors
    Programming Language Comparison

    This article is part of
    the Programming Language Comparison
    series.
    General Comparison
    Basic Syntax
    Arrays
    Associative arrays
    String Operations
    String Functions

    Evaluation strategy
    List of "hello world" programs

    Comparison of ALGOL 68 and C++
    Compatibility of C and C++
    Comparison of C and Pascal
    Comparison of C++ and Java
    Comparison of C# and Java
    Comparison of C# and Visual Basic .NET
    Comparison of ABAP and Java

    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.





    Contents

    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.

    Language   Paradigm(s)   Type strength   Type checking   Type safety   Compatibility   contracts  
    ActionScript 3.0 imperative, object-oriented, event-driven strong static safe No
    Ada concurrent, distributed, generic, imperative, object-oriented strong static safe nominative No
    ALGOL 58 imperative strong static safe No
    ALGOL 60 imperative strong static safe No
    ALGOL 68 concurrent, imperative strong  ? safe structural No
    APL array-oriented strong dynamic safe No
    BASIC No
    BLISS functional none n/a n/a n/a No
    C imperative weak static unsafe Yes
    C++ imperative, object-oriented, generic strong static unsafe nominative Yes
    C# imperative, object-oriented, generic strong static safe (but unsafe allowed) Yes
    Clean functional, generic strong with type inference static No
    COBOL imperative, object-oriented strong static No
    ColdFusion procedural, functional, object-oriented weak dynamic (duck) No
    Common Lisp imperative, functional, object-oriented strong dynamic safe Yes
    D imperative, object-oriented, generic strong static unsafe Yes, included
    Eiffel imperative, object-oriented, generic strong static safe nominative Yes, included
    Erlang functional, concurrent, distributed strong dynamic No
    F# functional, object-oriented, imperative, generic strong with type inference static safe nominative No
    Forth imperative, stack-oriented none n/a n/a n/a No
    Fortran imperative, procedural, object-oriented strong static safe nominative No
    GraphTalk logic-oriented, object-oriented weak No
    Groovy imperative, object-oriented, functional, aspect-oriented strong dynamic (duck) safe n/a Yes
    Haskell functional, generic, lazy evaluation strong with type inference static No
    Io imperative, object-oriented strong dynamic No
    Java imperative, object-oriented, generic strong static safe nominative Yes
    JavaScript imperative, object-oriented, functional weak dynamic Yes
    Joy functional, stack-oriented none n/a n/a n/a No
    Lisp functional strong dynamic No
    Lua procedural, imperative, reflective strong dynamic (duck) safe No
    Mathematica functional, procedural strong dynamic No
    Oberon imperative, object-oriented strong static safe No
    Objective-C imperative, object-oriented strong static No
    Objective Caml object-oriented, functional, imperative, generic strong with type inference static safe structural No
    Object Pascal (Delphi) imperative, object-oriented strong static safe (but unsafe allowed) nominative No
    Oz logic, functional, imperative, object-oriented, concurrent - multi paradigm dynamic No
    Pascal imperative strong static safe No
    Perl functional, object-oriented, procedural strong dynamic Yes
    PHP imperative, object-oriented, reflective weak dynamic No
    Prolog logic-oriented strong dynamic No
    Python imperative, object-oriented, functional, aspect-oriented strong dynamic (duck) Yes
    Ruby imperative, object-oriented, functional, aspect-oriented strong dynamic (duck) Yes
    Scala object-oriented, functional, generic strong with partial type inference static No
    Scheme functional strong dynamic (latent) Yes
    Smalltalk object-oriented, functional, concurrent, event-driven, imperative, declarative strong dynamic (duck) safe No
    Tcl functional, object-oriented, imperative, procedural, event-driven dynamic No
    Visual Basic component-oriented, event-driven strong static safe nominative Limited (VB5/6 only)
    Visual Basic .NET object-oriented, event-driven strong static No
    Visual Prolog logical, object-oriented, functional, event-driven, imperative, declarative strong static safe nominative No
    Windows PowerShell imperative, object-oriented, functional, pipeline strong dynamic (duck) safe No
    XL concept programming, imperative (by default), object-oriented (multiple models), strong static safe nominative No

    Usage

    Language   Designed use   Design Goals  
    ActionScript 3.0 web design
    Ada embedded ease of avoiding bugs
    ALGOL interpreter based scientific programming
    APL compressed programming style vector based formulation
    BASIC application ease of use/learning
    BLISS system no type system
    C system easy to implement
    C++ object oriented application extend C
    C# application
    Clean
    COBOL business/financial
    ColdFusion web server
    Common Lisp application standardize Lisp
    D application C-likeness
    Eiffel
    Erlang telecom applications ease of building fault-tolerant scalable applications
    F#
    Forth
    Fortran scientific applications (number crunching) easily constructed optimised code
    GraphTalk insurance applications ease of use/learning
    Groovy application cross platform executablity, ease of use/learning
    Haskell application
    Io
    Java application cross platform executablity, C-likeness
    JavaScript web design
    Joy
    Lisp Artificial intelligence list handling
    Lua
    Mathematica symbolic manipulation of functions same
    Oberon
    Objective-C general extend C
    Objective Caml
    Object Pascal (Delphi)
    Oz
    Pascal application ease of use/learning
    Perl application
    PHP web server
    Prolog
    Python application ease of use/learning
    Ruby application ease of use/learning
    Scala
    Scheme application
    Smalltalk expert system development
    SNOBOL text manipulation
    Tcl
    Visual Basic MS Office product based applications ease of use/learning
    Visual Basic .NET application ease of use/learning
    Visual Prolog expert systems ease of use
    Windows PowerShell IT administration ease of use/learning
    XL application extensiblity, ease of use

    Expressiveness

    Language Statements ratio[2] Lines ratio[3]
    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.[4] 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

    References

    1. ^ As of May 2006 Diarmuid Pigott's Encyclopedia of Computer Languages hosted at Murdoch University, Australia lists 8512 computer languages.
    2. ^ 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.
    3. ^ 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.
    4. ^ From On the Expressive Power of Programming Languages, Matthias Felleisen, ESOP '90 3rd European Symposium on Programming.

    External links


    This article is licensed under the GNU Free Documentation License. It uses material from Wikipedia Encyclopedia article "Comparison of Programming Languages"

    Scientists and Inventors    Scientists and Inventors    Scientists and Inventors   

    My Dog Kelly

    Site Map ♣ About Us ♣ Patent-Invent ♣ Free Theses, Dissertations & Patents

    Comments and inquiries could be addressed to:
    webmaster@julianTrubin.com


    Last updated: August 2007
    Copyright © 2003-2007 Julian Rubin