[mercury-users] Circular lists

Henk Vandecasteele henkv at cs.kuleuven.ac.be
Thu Nov 27 19:47:50 AEDT 1997


Richard A. O'Keefe wrote:
> 
>     Thomas Charles CONWAY <conway at students.cs.mu.oz.au> wrote
> 
>         With all this talk of circular lists, I thought people might be
>         interested/amused by the following.
> 
>         Beware, it is a complete hack, but IMHO quite cute.
> 
> We've seen quite a few examples recently of how Mercury's C interface can be
> used to do strange and terrible things.  I keep on telling people that one
> of the reasons special-purpose languages can be such a productivity boost
> is not what they make it _easy_ to do but what they make it _impossible_ to
> do; what classes of possible bugs are completely eliminated by construction
> so that you don't have to spend any time at all looking for them.
> 
> Thomas Conway has just shown us how Mercury's C interface can be used to
> subvert Mercury's compile-time termination verification.  That's not what
> he meant it for, of course, but that is one (and not the worst) of its
> effects.
> 
> I'm not into _forcing_ people to do what's good for them, but when using
> Mercury I would very much like to know for certain that nothing of the
> sort was going to affect my code.  Mercury is supposed to provide me with
> speed AND safety.


So what happens if you get stuck with an application Mercury
does not give you the speed you need, and I am speaking of orders
of magnitude!

You advise those people to skip Mercury, and use C?

I thought it was better to use the C interface to build a dirty
module with high efficiency AND a clean interface.

Still almost all code of the application can be checked by Big Boss
Mercury, the correctness of the dirty module is of course my
own responsibility, but as it is very small, ...

I am VERY happy with this solution: I got efficiency, fast development,
very few bugs, ... .

You tell me I'm WRONG?

Henk





More information about the users mailing list