[mercury-users] Circular lists
arc at sequence.Stanford.EDU
Thu Nov 27 12:53:16 AEDT 1997
Richard O'Keefe's comments about not letting users --- or at least not
code that he himself compiles -- do the "wrong" things struck a chord with
The following comments are thoughts I had a few years ago when deciding
to change programming languages to caml. I mention them as other people
may have the same thought processes.
One of the major choices I felt that I had to make was between a "pure"
language (eg haskell, mercury) or an "impure" language (eg ML, C).
Stating the obvious, the arguements for "pure" languages were the
reasoning - either human or machine - that one could do more easily,
coupled with the possibility of lazy evaluation. This was a big draw,
but not up to the disadvantages that I saw...passing around state can
be annoying, and modifying large circular data structures can feel
very artificial in "pure" languages.
Once I had decided that I wanted an impure language, then I didn't want
to use a language that was designed with purity in mind, as one would
have the worst of both worlds...both the "normal" cumbersomeness of
purity (yeah, you can have DCGs and monads and unique types and all sorts
of moderately cumbersome things, but I am not all that impressed), coupled
with the possibility of having to think about impure features.
So the things I was considering were
- a pure lanugage
- a language that didn't really even think about purity.
I chose the latter. Now you might think that by adding back doors into
the "purity" you will attract people who would go for ML type languages,
but I contend that it is probably the opposite. I would not have liked
the idea of something that was almost always "pure".
Maybe I have misunderstood the issues, but then other people like me
- the unconverted - will probably misunderstand them in the same way.
More information about the users