Erlang (programming language): Difference between revisions

Content deleted Content added
See also: added description of Gleam
Kckid (talk | contribs)
m ECT was and add on library stuck in google code. It is not part of Erlang. Erlang is not OOP in any way. Despite Joe Armstrong's off-hand comment that it was. Anyone who's been around a while knows he wasn't being serious. Implying or stating that Erlang/OTP was based on Alan Kay's OOP or the Grady Booch culture is an insult to his memory.
Line 34:
*[[Hot swapping#Software|Hot swapping]], where code can be changed without stopping a system.<ref>{{cite web |last1=Armstrong |first1=Joe |last2=Däcker |first2=Bjarne |last3=Lindgren |first3=Thomas |last4=Millroth |first4=Håkan |title=Open-source Erlang – White Paper |url=http://ftp.sunet.se/pub/lang/erlang/white_paper.html|archive-url=https://web.archive.org/web/20111025022940/http://ftp.sunet.se/pub/lang/erlang/white_paper.html |archive-date=25 October 2011 |access-date=31 July 2011}}</ref>
 
The Erlang [[programming language]] has [[Immutable object|immutable]] data, [[pattern matching]], and [[functional programming]].<ref>Hitchhiker’s Tour of the BEAM – Robert Virding http://www.erlang-factory.com/upload/presentations/708/HitchhikersTouroftheBEAM.pdf</ref> The sequential subset of the Erlang language supports [[eager evaluation]], [[single assignment]], and [[dynamic typing]].
 
A normal Erlang application is built out of hundreds of small Erlang processes.
Line 51:
 
===Processes===
Erlang applications are built of very lightweight Erlang processes in the Erlang runtime system. Erlang processes can be seen as "living" objects ([[object-oriented programming]]), with data encapsulation and [[message passing]], but capable of changing behavior during runtime. The Erlang runtime system provides strict [[process isolation]] between Erlang processes (this includes data and garbage collection, separated individually by each Erlang process) and transparent communication between processes (see [[Location transparency]]) on different Erlang nodes (on different hosts).
 
Joe Armstrong, co-inventor of Erlang, summarized the principles of processes in his [[Doctor of Philosophy|PhD]] [[thesis]]:<ref>{{Cite thesis |last=Armstrong |first=Joe |title=Making reliable distributed systems in the presence of software errors |date=20 November 2003 |degree=DTech |publisher=The Royal Institute of Technology |place=Stockholm, Sweden}}</ref>
Line 241:
;Strings: Strings are written as doubly quoted lists of characters. This is syntactic sugar for a list of the integer [[Unicode]] code points for the characters in the string. Thus, for example, the string "cat" is shorthand for <code>[99,97,116]</code>.<ref>{{cite web |url=http://erlang.org/doc/apps/stdlib/unicode_usage.html#string-and-character-literals |title=String and Character Literals |access-date=2 May 2015}}</ref>
;Records: Records provide a convenient way for associating a tag with each of the elements in a tuple. This allows one to refer to an element of a tuple by name and not by position. A pre-compiler takes the record definition and replaces it with the appropriate tuple reference.
 
Erlang has no method to define classes, although there are external [[Library (computing)|libraries]] available.<ref>{{cite web |url=https://code.google.com/p/ect/ |title=ect – Erlang Class Transformation – add object-oriented programming to Erlang – Google Project Hosting |access-date=2 May 2015}}</ref>
 
=="Let it crash" coding style==