Oz (programming language): Difference between revisions

Content deleted Content added
update release date 2.0.1 ( https://github.com/mozart/mozart2/releases )
Rescuing 3 sources and tagging 1 as dead.) #IABot (v2.0
Line 35:
| pages = 324–343
| url= https://www.ps.uni-saarland.de/Publications/documents/Vol1000.pdf}}
</ref> contains most of the concepts of the major [[programming paradigm]]s, including logic, functional (both [[lazy evaluation]] and [[eager evaluation]]), imperative, object-oriented, constraint, distributed, and concurrent programming. Oz has both a simple formal semantics (see chapter 13 of the book mentioned below) and {{Citation needed-span|date=June 2007|text=an efficient implementation.}} Oz is a [[Concurrency (computer science)|concurrency]]-oriented language, as the term was introduced by Joe Armstrong, the main designer of the [[Erlang (programming language)|Erlang language]]. A concurrency-oriented language makes concurrency easy to use and efficient. Oz supports a canonical [[graphical user interface]] (GUI) language QTk.<ref>[{{Cite web |url=http://www.mozart-oz.org/home/doc/mozart-stdlib/wp/qtk/html/ |title=QTk] |access-date=6 April 2009 |archive-url=https://web.archive.org/web/20130520060646/http://www.mozart-oz.org/home/doc/mozart-stdlib/wp/qtk/html/ |archive-date=20 May 2013 |url-status=dead }}</ref>
 
In addition to multi-paradigm programming, the major strengths of Oz are in [[constraint programming]] and [[distributed programming]]. Due to its factored design, Oz is able to successfully implement a network-transparent distributed programming model. This model makes it easy to program open, [[Fault tolerance|fault-tolerant]] applications within the language. For constraint programming, Oz introduces the idea of ''computation spaces'', which allow user-defined search and distribution strategies [[Orthogonal#Computer science|orthogonal]] to the constraint ___domain.
Line 58:
 
===Functions===
Functions<ref name="Advanced Functional Programming in Oz">{{cite book
{{cite book
| author = Leif Grönqvist
| title = Advanced Functional Programming in Oz
| chapter = Higher Order Functions
| url = http://www2.gslt.hum.gu.se/~leifg/gslt/doc/ozfunpaper.ps
| access-date = 3 November 2014
}}
| archive-url = https://web.archive.org/web/20160303171453/http://www2.gslt.hum.gu.se/~leifg/gslt/doc/ozfunpaper.ps
</ref> are first class values, allowing [[Higher-order programming|higher order functional]] programming:
| archive-date = 3 March 2016
| url-status = dead
}}</ref> are first class values, allowing [[Higher-order programming|higher order functional]] programming:
<source lang="erlang">
fun {Fact N}
Line 177 ⟶ 179:
</source>
 
Because of the way dataflow variables work, it is possible to put threads anywhere in a program and guaranteed that it will have the same result. This makes concurrent programming very easy. Threads are very cheap: it is possible to have 100,000 threads running at once.<ref>{{Cite web |url=http://www.mozart-oz.org/documentation/tutorial/node8.html#chapter.concurrency |title=Archived copy |access-date=29 November 2008 |archive-url=https://web.archive.org/web/20150224185115/http://www.mozart-oz.org/documentation/tutorial/node8.html#chapter.concurrency |archive-date=24 February 2015 |url-status=dead }}</ref>
 
===Example: Trial division sieve===
Line 304 ⟶ 306:
 
==Execution speed==
The execution speed of a program produced by the Mozart compiler (version 1.4.0 implementing Oz 3) is very slow. On a [[The Computer Language Benchmarks Game|set of benchmarks]] it averages about 50 times slower than that of the [[GNU Compiler Collection]] (GCC) for the C language, solving the benchmarks-tasks.{{when|date=September 2017}}<ref>[http://shootout.alioth.debian.org/u32/which-programming-languages-are-fastest.php?calc=chart&gcc=on&oz=on The Computer Language Benchmarks Game]{{Dead link|date=April 2020 |bot=InternetArchiveBot |fix-attempted=yes }}</ref>{{failed verification|date=February 2014}}
 
==See also==