getting started

Fergus Henderson fjh at cs.mu.oz.au
Sun Sep 7 00:26:01 AEST 1997


Michael Skowronski wrote:
> Dear Sirs,
> 
> I visited your web page and am very excited about learning to program with
> Mercury.  Unfortunately for me, i have no experience with logic prgramming
> languages and have only recently became interested in them. Furthermore,
> my co-workers/colleagues do not have any real experience with them either. 
> Thus, i would like to ask if you could please recommend to me a good way
> to get started (a good book perhaps?).  i have a strong background in C++
> and i have experimented with wamcc a little bit.  you also might be
> interested to know that the reason i became interested in logic
> programming was because i've recently been working with c++ expression
> templates and they behave similarly to logic programs -- ie. evaluate
> expressions as opposed to executing a bunch of commands. anyway, any
> suggestions you could provide will be appreciated.

Unfortunately there are as yet no books specifically about Mercury.
There are however some books on logic programming that are probably
quite good.  One that I can recommend is "The Art of Prolog" by
Sterling & Shapiro (MIT Press, ISBN 0-262-19338-8).  The first 100 or so
pages are just logic programming, without any Prolog-specifics.  And most
of the remainder could be useful, even though it discusses Prolog rather
than Mercury.

For learning Mercury itself, one place to start is Zoltan Somogyi's
lecture notes for the Mercury segment of Melbourne Uni's second-year
undergrad subject "Frontiers of Computer Science".  These are available
from our WWW page <http://www.cs.mu.oz.au/mercury/papers.html>.
After that, you may be ready to tackle the Mercury language reference manual.

But I personally find that one of the best ways of learning a new language
is to

	(1) read programs, and

	(2) write programs

in that language.  The Mercury distribution comes with a few programs
designed specifically as examples in the `samples' directory, and after
that there is of course the source code for the Mercury library, profiler,
and compiler.

And if you run into trouble, there's always the mercury-users mailing list.

Cheers,
	Fergus.

-- 
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 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the users mailing list