Erlang (programming language)/Tutorials/behaviours: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Eric Evers
No edit summary
imported>Meg Taylor
m (spelling: officialy -> officially)
 
(One intermediate revision by one other user not shown)
Line 2: Line 2:


A process is a little bit like an instance of a class in java.  
A process is a little bit like an instance of a class in java.  
Behaviours in erlang are very similar to interfaces in java. A set of call back functions is required and used. Using only functions works well with erlang because there are no actual member variables in erlang processes. Processes can pass variables to themselves recursively, but they are not officialy member variables.
Behaviours in erlang are very similar to interfaces in java. A set of call back functions is required and used. Using only functions works well with erlang because there are no actual member variables in erlang processes. Processes can pass variables to themselves recursively, but they are not officially member variables.

Latest revision as of 16:59, 10 February 2010

Behaviours (beware the extra 'u' in behaviour for american programmers)

A process is a little bit like an instance of a class in java. Behaviours in erlang are very similar to interfaces in java. A set of call back functions is required and used. Using only functions works well with erlang because there are no actual member variables in erlang processes. Processes can pass variables to themselves recursively, but they are not officially member variables.