Content deleted Content added
clean up using AWB |
evidence? |
||
Line 21:
Mercury is a more [[Declarative programming|declarative]] language than [[Prolog]], since it lacks "extra-logical" Prolog statements such as "cut" (which prevents [[backtracking]]) and [[imperative programming|imperative]] [[I/O]]. This enables better program [[Optimization (computer science)|optimization]], but makes coding sequential algorithms harder.
Mercury has a strong emphasis on purity. While it allows impure functionality, this must be explicitly marked, and at the top level all functionality must either be pure or the programmer must promise that it is pure. Often impure operations can be made pure by threading the I/O state through them, as is done in the Mercury standard library. Due to the optimizations enabled by the purity of the language, programs written in Mercury typically perform significantly faster than equivalent programs written in Prolog{{cn}}.
Mercury is available for most [[Unix]] platforms, including [[Mac OS X]], and [[Microsoft Windows]] (on the latter platform, it requires one of the [[Cygwin]] or [[MinGW]] toolsets, and can be compiled either with gcc or [[Visual C++|Microsoft Visual C++]]).
|