[mercury-users] Mercury needs a Tutorial
Luke Evans
Luke.Evans at seagatesoftware.com
Fri Feb 12 06:01:40 AEDT 1999
Speaking as someone who would definitely benefit from a tutorial (basically
I have a penchant for LP languages, well OK PROLOG, since Uni., but I now
live firmly ensconced in the imperative language world of Java/C++ during
the daylight hours(!)), here are my comments:
1. I would like to see the tutorial pitched at the large 'user base' of
imperative languages. This way it's also a document expounding the benefits
of LP (and particularly of Mercury which does so many things that Java/C++
progammers are used to much better than other common LP languages). Is it
not the case that after a chapter or two, you'll have hopefully carried the
imperative programmer to a point where he can be joined by those who already
have LP experience under their belt? I guess this is the perennial
challenge of structuring the flow of information appropriately for slightly
different audiences.
2. I have always found programming examples invaluable. Programming is
inherently a 'doing' thing. You only really learn by exploring the language
yourself, but examples definitely give you a step up as you have ready made
structure in which to start experimenting.
3. I've seen some good hypertext tutorials. Among them are the Java
Tutorial (available on the Sun web site). However, whilst good for
interactive exploration of the content, HTML printing is still only weakly
supported by applications/browsers which is a personal gripe. Consequently
I'm always hoping for a PDF/DOC version that I can get quality hardcopy
from.
5. I'd like the tutorial to build through the simple concepts to good
examples of higher order LP with rationales for their use, examples in
Mercury, pros and cons and potential pitfalls (both conceptual and Mercury
specific). I realise that a bunch of this will be available from other,
generic, LP texts and also other language manuals, but I think a 'complete
picture' focused around Mercury will be important for the 'comfort factor'
of the reader.
Luke.
-----Original Message-----
From: Ralph Becket [mailto:rwab1 at cam.sri.com]
Sent: Thursday, February 11, 1999 1:57 AM
To: mercury-users at cs.mu.OZ.AU; Luke.Evans at seagatesoftware.com
Subject: Re: [mercury-users] Mercury needs a Tutorial
Funnily enough, I started work on a tutorial last night. A number of
questions raise their heads:
1. What level should we pitch the tutorial at? If we assume
familiarity with (e.g.) Prolog then the tutorial will be of less use
in an undergrad' teaching setting and no use at all in getting Mercury
out to the non-LP masses. I'm inclined (and this is the approach I
started out with last night) to assume nothing other than a reasonably
general computer science background and some past programming
experience. The trouble with this approach is that it's probably too
verbose for LP experts who want to learn Mercury.
2. To teach by example or not? I've started out with "Hello, World!"
as is the tradition. I'm planning on starting with short new programs
to illustrate each new concept. Does anybody have any strong feelings
that this is the wrong way to go?
3. Traditional `flat' text vs hypertext. I had a look at Chris
Phoenix' Smalltalk tutorial a while back and was greatly impressed.
The neat idea was that code is presented in a web page and the viewer
can click on any token in the code to get a `pop-up' explanation.
Take a peek at
http://squeak.cs.uiuc.edu/cphoenix_tutorial/hrefcode.html
I'm not at all sure whether this would work for a whole tutorial
(Chris only uses it for one example, but I have to say I found it most
enlightening). An alternative is to stick with `plain' hypertext.
Any thoughts?
4. One problem with teaching Mercury is that there are a number of
subtle aspects to the language that you are usually forced to consider
explicitly in your code (e.g. mode and determinism declarations).
Teaching a non-Prolog type how "Hello, World!" works is non-trivial.
The very first example introduces modules, interfaces, module use,
implementations, unique modes and DCGs! You should probably add the
notion of `predicate' to that list as well. In my first draft I've
mentioned these with a few calming words to the effect that all will
become clear in time. That said, Leon, scaling the learning cliff is
well worth the effort! My friends are sick of me evangelising about
how cool Mercury is to program in.
5. How far is the tutorial expected to take people? Do we try to
cover everything or merely enough to let people approach the reference
manual with some confidence (as is obvious from this mailing list, the
ref. manual has been carefully written, but it also requires careful
interpretation)?
This isn't going to work without feedback. Are there people out there
who can spare the odd ten minutes to look over what I've done and
either recommend changes or improve it themselves? We'll need
relative novices to say whether anything is getting through and
experts to check that nothing too far from the truth is said.
Cheers,
Ralph
--
Ralph Becket | rwab1 at cam.sri.com |
http://www.cam.sri.com/people/becket.html
More information about the users
mailing list