Mercury and PDC Prolog
fjh at cs.mu.oz.au
Sun Dec 21 01:32:27 AEDT 1997
In mail to mercury at cs.mu.oz.au,
Bruce Gould <bcgould at enteract.com> wrote:
> I'm currently programming in PDC Prolog, which is a strongly typed
> Prolog. I believe I am getting execution speeds close to that of a C
> program. On the surface, it sounds like there are some similarities
> between Mercury and PDC.
Yes, Turbo Prolog (the predecessor to PDC Prolog) was one of the
languages that influenced Mercury.
> Are you aware of PDC?
> If so, can you tell me the differences between PDC
> and Mercury?
I posted an article to comp.lang.prolog describing the
differences between Turbo Prolog and Mercury a year or two ago --
try searching for it with Dejanews.
Note that PDC's latest product, Visual Prolog, has in fact
incorporated some of Mercury's features,
e.g. the keywords `erroneous' and `failure',
higher-order predicates (done in a differently to how
they are done in Mercury, however), and
functions (although they did a fairly hacky job of it).
Some of the major language differences are
- Mercury is a "pure" logic language, whereas Turbo/PDC/Visual
Prolog is not;
- Mercury has a more flexible type system (parametric polymorphism).
[And coming soon: type classes! (similar to Java interfaces)]
There are also some implementation differences:
- Visual Prolog comes with a good GUI environment,
Mercury does not (although it does work well with
standard Unix tools, e.g. emacs).
- Visual Prolog runs on x86 machines only, whereas
Mercury runs on a variety of architectures (e.g. x86, Alpha,
Sparc, Mips, PowerPC). On the other hand, VP runs on
Windows, DOS, Unix, and OS/2, whereas Mercury currently runs
only on Unix and Windows. (Other ports would of course be
possible -- see the archives of the mercury-users mailing list.)
And some other differences:
- Mercury is free, and comes with source code,
whereas Visual Prolog costs money and does not
include source code.
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 126.96.36.199 | -- the last words of T. S. Garp.
More information about the users