Occam (programming language): Difference between revisions

Content deleted Content added
Danakil (talk | contribs)
No edit summary
Danakil (talk | contribs)
No edit summary
Line 1:
'''Occam''' (from [[William of Ockham]] of [[Occam's Razor]] fame) is a [[Parallel computing|parallel]] [[programming language]] that builds on [[Communicating Sequential Processes]] (CSP) and shares many of their features. It is, in a way, a practical executable implementation of CSP.
 
'''Occam''' is aan [[Parallelimperative computing(programming)|parallelimperative]] [[procedural (programming)|procedural]] language (such as [[Pascal (programming language)|Pascal]]). Occam developedwas eveloped by [[Inmos]] for their line of [[Transputer]]s., but Implementationsimplementations for other platforms exist as well. (The language's name refers to [[William of Ockham]], responsible for [[Occam's Razor]].)
 
Occam builds on [[Communicating Sequential Processes]] (CSP) and shares many of the same features. It is, in a way, a practical implementation of CSP. Occam is an [[imperative (programming)|imperative]] [[procedural (programming)|procedural]] language (such as [[Pascal (programming language)|Pascal]]).
 
Note in examples below that indentation and formatting are critical for parsing: expressions are terminated by the end of the line, lists of expressions need to be on the same level of indentation (this feature is also found in other languages, such as [[Python (programming language)|Python]], [[Haskell (programming language)|Haskell]], [[Icon (programming language)|Icon]], [[Miranda (programming language)|Miranda]], and [[ABC (programming language)|ABC]]).
 
==Overview==
Note that in the examples below that indentation and formatting are critical for parsing the code: expressions are terminated by the end of the line, lists of expressions need to be on the same level of indentation (this feature is also found in other languages, such as [[Python (programming language)|Python]], [[Haskell (programming language)|Haskell]], [[Icon (programming language)|Icon]], [[Miranda (programming language)|Miranda]], and [[ABC (programming language)|ABC]]).
 
Communication between processes work through named ''channels''. One process outputs data to a channel via '''!''' while another one inputs data with '''?'''. Input and output will block until the other end is ready to accept or offer data. Examples (c is a variable):