Mercury (programming language)

related topics
{math, number, function}
{system, computer, user}
{language, word, form}
{company, market, business}
{work, book, publish}

Mercury is a functional logic programming language geared towards real-world applications. It is developed at the University Of Melbourne Computer Science department under the supervision of Zoltan Somogyi. The first version was developed by Fergus Henderson, Thomas Conway and Zoltan Somogyi and was released on April 8, 1995.

Mercury is a purely declarative logic language. It is related to both Prolog and Haskell[1]. It features a strong, static, polymorphic type system, as well as a strong mode and determinism system.

The official implementation, the Melbourne Mercury Compiler is available for most Unix platforms, including Mac OS X, as well as for Microsoft Windows (in Windows, it requires one of the Cygwin or MinGW toolsets, and can be compiled either with GCC or Microsoft Visual C++).

Contents

Overview

Mercury is based on the logic programming language Prolog. It has the same syntax, and the same basic concepts such as the SLD resolution algorithm. It can ostensibly be viewed as a pure subset of Prolog with strong types and modes. As such, it is often compared to its predecessor, both in terms of features, and run-time efficiency.

The language is designed with software engineering principles in mind.[neutrality is disputed] Unlike the original implementations of Prolog, it has a separate compilation phase, rather than being directly interpreted, which allows a much wider range of errors to be caught before running a program. (Modern versions of Prolog normally support compilation as well as providing an interpreter. An executable produced by a modern Prolog compiler can also be very efficient.) It features a sophisticated, strict type and mode system, which its authors claim makes it much easier to write robust software[1]. Mercury's module system enables division into self-contained units, a problem for past logic programming languages. (But note that several Prolog implementations now also support modules.)

Full article ▸

related documents
Tcl
Blowfish (cipher)
Rich Text Format
Java applet
Dynamic HTML
Interchange File Format
Bytecode
Java API for XML Processing
Data structure
MOO (programming language)
Turing completeness
Pliant
Occam (programming language)
C shell
Code
Dekker's algorithm
Client-side scripting
Lex programming tool
Erlang unit
Non-deterministic Turing machine
Tiny BASIC
Code refactoring
Search engine (computing)
Denormalization
Basic Encoding Rules
Wikipedia:Browser notes
Serial number
World file
Oberon programming language
Hello world program