Talk:Oz (programming language): Difference between revisions

Content deleted Content added
Adding {{Old AfD multi}}
More examples: new section
Line 50:
*{{citation | first=Gert | last=Smolka | title=The Oz Programming Model | publisher=Springer | series=Lecture Notes in Computer Science | volume=1000 | pages=324–343 | url=http://scidok.sulb.uni-saarland.de/volltexte/2011/3751/pdf/RR_95_10.pdf}}
[[User:Lesser Cartographies|Lesser Cartographies]] ([[User talk:Lesser Cartographies|talk]]) 03:24, 3 September 2013 (UTC)
 
== More examples ==
 
Since this language claims to support so many paradigms it would be useful to have more examples. It seems the following paradigms are covered so far:
 
* functional (lazy and eager)
* dataflow
* concurrent
* message passing
* object oriented
 
But what about the following?
 
* imperative: are there the traditional for/while loops? better example of imperative algorithms changing variables?)
* logic programming: perhaps the sibling prolog example below would translate well?
* constraint programming: Perhaps one could solve the [[Verbal_arithmetic|SEND+MORE=MONEY]], using an all_different constraint etc.
* discussion how parallel vs concurrent apply to the langauge
 
Prolog example:
<source lang="prolog">
mother_child(trude, sally).
father_child(tom, sally).
father_child(tom, erica).
father_child(mike, tom).
sibling(X, Y) :- parent_child(Z, X), parent_child(Z, Y).
parent_child(X, Y) :- father_child(X, Y).
parent_child(X, Y) :- mother_child(X, Y).
</source>
 
This results in the following query being evaluated as true:
 
<syntaxhighlight lang="prolog">
?- sibling(sally, erica).
Yes
</syntaxhighlight>