|
Mercury occurs as functional logic programming language based on Prolog, but further geared towards practical applications. A latest official release was version Nought.Dozen, on the 9th September, 2005.
Mercury has many features meant for better software engineering than is possible sustaining Prolog. These are compiled rather than interpreted, as is traditional for logic programming languages. It features the sophisticated, nonindulgent type and mode system. Its authors claim these features combined using logic programming's abstract nature and severity speeds write on dependable software online. Mercury's module technique enables section into self-contained units, the condition for retiring logic programming languages. (However note that many existent Prolog implementations as well include module systems.)
Mercury occurs as extra "pure", & so supplementary declarative, language than Prolog, since it does not stand "extra-logical" Prolog features such as a "cut" (the Prolog construct which prevents backtracking) and imperative I/O. This makes a disregard of consecutive algorithmic program somewhat other cumbersome, however it makes machine-controlled program optimization easier. This means that it may create significantly sooner code than Prolog.
Hullo Globe inside Mercury:
:- module how-do-you-do.
:- interface.
:- import_module io.
:- pred independent(io.state, io.state).
:- mode independent(di, uo) is det.
:- implementation.
main(!IO) :-
io.write_string("Hello, World!\n", !IO).
(altered from either Ralph Becket's [http://www.cs.mu.oz.au/research/mercury/tutorial/book/book.pdf Mercury tutorial]).
Mercury is developed at a University Of Melbourne Computer Science department under the supervising of Zoltan Somogyi.
Mercury is however extremely experimental, & virtually unused outside a team of its creators.
Mercury has many back-ceases, including on line-level C (a original Mercury back-prevent), high-level C, Microsoft's IL for .NET, Sun's JVM, & assembly program via a gcc back-end (a previous trine come merely considered alpha or even beta quality). This makes it utile for even targeting multiple platforms, or linking using code written within multiple back-finishes. A ability to include native code through these platforms is helpful, though it restricts a portability to more Mercury back-terminates.
Mercury is available for virtually all Unix platforms, for Mac OS X, & for Microsoft Windows using the Cygwin toolset.
|