Erlang (programming language): Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Eric Evers
No edit summary
imported>Eric Evers
No edit summary
Line 3: Line 3:


'''Erlang''' is a general-purpose, functional [[computer]] [[programming language]] which shares some syntax with [[prolog]].  '''Erlang''' was developed in 1987 by [[Joe Armstrong]] and others (then of [[Ericsson]]) for use to program telephone networks. Ref: Joe Armstrong (2003). "Making reliable distributed systems in the presence of software errors". Ph.D. Dissertation.  
'''Erlang''' is a general-purpose, functional [[computer]] [[programming language]] which shares some syntax with [[prolog]].  '''Erlang''' was developed in 1987 by [[Joe Armstrong]] and others (then of [[Ericsson]]) for use to program telephone networks. Ref: Joe Armstrong (2003). "Making reliable distributed systems in the presence of software errors". Ph.D. Dissertation.  
ArmDis <ref Name=ArmDis>[http://www.erlang.org/download/armstrong_thesis_2003.pdf Armstrong Dissertation]</ref>
ArmDis <ref Name=ArmDis>[http://www.erlang.org/download/armstrong_thesis_2003.pdf Armstrong Dissertation]</ref> New versions are released by Ericsson on a yearly basis. At present(2008) there is increased interest in parallel programming languages because of the use of [[multicore]] microprocessors in personal computers.
New versions are released by Ericsson on a yearly basis. At present(2008) there is increased interest in parallel programming languages because of the use of [[multicore]] microprocessors in personal computers.


==Syntax==
==Syntax==

Revision as of 14:26, 29 January 2008

This article is developing and not approved.
Main Article
Discussion
Related Articles  [?]
Bibliography  [?]
External Links  [?]
Citable Version  [?]
Tutorials [?]
 
This editable Main Article is under development and subject to a disclaimer.

For other uses, see erlang (disambiguation).

Erlang is a general-purpose, functional computer programming language which shares some syntax with prolog. Erlang was developed in 1987 by Joe Armstrong and others (then of Ericsson) for use to program telephone networks. Ref: Joe Armstrong (2003). "Making reliable distributed systems in the presence of software errors". Ph.D. Dissertation. ArmDis [1] New versions are released by Ericsson on a yearly basis. At present(2008) there is increased interest in parallel programming languages because of the use of multicore microprocessors in personal computers.

Syntax

Hello World

-module(hello).
-export([start/0]).

start() ->
   io:format("Hello, world!\n").

Analysis of the example

The Hello World program (see above) appears in many programming languages books and articles as a cursory introduction into a language's syntax. It was introduced in the book The C Programming Language[2].

-module(hello) tells the compiler to create a new module(library) called hello. The code tells us the file name for this code: hello.erl.

-export([start/0]). exports a function named start with 0 arguments to the world outside of this module called hello.

start() -> tells the compiler that there is a function named start() with no arguments.

io:format("Hello, world!\n"). will make the program output Hello, world! and a new line (\n) on the screen.

See also

References

  1. Armstrong Dissertation
  2. Cite error: Invalid <ref> tag; no text was provided for refs named K&R