Content deleted Content added
Module names are separated by dots now. |
No edit summary |
||
Line 1:
'''Mercury''' is a [[Functional programming|functional
Mercury has several features intended for better [[software engineering]] than is possible with Prolog. It is [[compiler|compiled]] rather than interpreted, as is traditional for logic programming languagues. It features a sophisticated, strict [[Data type|type]] and mode system. Its authors claim these features
Mercury is a more "pure", and therefore more [[Declarative programming|declarative]], language than Prolog, since it does not have "extra-logical" Prolog features like the "cut" (a Prolog construct which prevents [[backtracking]]) and [[imperative programming|imperative]] [[I/O]]. This makes the coding of sequential algorithms somewhat more cumbersome, but it makes automated program [[Optimization (computer science)|optimization]] easier.
Hello World in Mercury:
<pre>
:- module
:- interface.
:- import_module io.
:- pred main(io.state, io.state).
:- mode main(di, uo) is det.
:- implementation.
main(!IO) :-
io.write_string("Hello, World!\n", !IO).▼
▲ io.write_string("Hello, World!\n").
</pre>
(
Mercury is developed at the [[University Of Melbourne]] Computer Science department under the supervision of [[Zoltan Somogyi|Dr. Zoltan Somogyi]].▼
▲Mercury is developed at the [[University Of Melbourne]] Computer Science department under the supervision of [[
Mercury is still highly experimental, and virtually unused outside the team of its creators.
==External links==
|