[mercury-users] Mercury in academic teaching?
Jonathan Morgan
jonmmorgan at gmail.com
Wed Oct 11 12:46:45 AEST 2006
On 10/10/06, Nicholas Nethercote <njn at csse.unimelb.edu.au> wrote:
> On Tue, 10 Oct 2006, Peter Schachte wrote:
>
> >> On Mon, 9 Oct 2006, Jonathan Morgan wrote:
> >>> Think like a computer scientist - so long as we get the same
> >>> asymptotic efficiency, who cares about these minor constant factor
> >>> differences?
> >>
> >> Almost everybody who isn't just coding for a class.
Agreed.
> > The point I was making was that the difference between min/3 returning
> > the same value twice when the numbers are equal, returning it only
> > once but still leaving a choicepoint, and having code that Mercury
> > would classify as 'det', is only one of efficiency, not correctness.
> > This distinction should be discussed much later in a subject on logic
> > programming, but would be difficult to delay in a subject using
> > Mercury. If --infer-modes works well enough, that might be the
> > answer, but I'd have to use it pretty extensively before I was
> > confident it wouldn't give error messages that would create more
> > confusion than it avoided.
>
> Sure. I wasn't disagreeing with your comment, I was disagreeing with
> Jonathan's comment.
I disagree with it too. However, that is the impression that I get
from algorithms education and computer science education in general,
and also from pushing increasingly high-level languages that either
(like Prolog) require you to do nasty things in order to increase
efficiency to a reasonable level, or just leave you with no concept of
how much basic operations really cost (like Java/.NET). I'm quite
happy with the approach of Mercury, that (generally) optimisations
should be done by the compiler, not the user.
Jon
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to: mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions: mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the users
mailing list