[m-dev.] proposed change to coding standards

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Jun 2 15:42:05 AEST 2008


I propose that we change the coding standard to say that the standard
library should *not* use abstract equivalence types.  There are (at
least) two reasons for this:

(1) in the absence of a global check for overlapping instances the use
of types defined using abstract equivalences in instance declarations in
user code can have some rather surprising results (e.g. linker errors).
Furthermore, these restrictions are not currently documented anywhere.

(2) even in the presence of a global check there is a risk that abstract
equivalences in the library will clash with instances in the users code.
Avoiding this requires the programmer to know the definition of a type,
which somewhat defeats the point of having the abstraction barrier
there in the first place.

Julien.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at csse.unimelb.edu.au
Administrative Queries: owner-mercury-developers at csse.unimelb.edu.au
Subscriptions:          mercury-developers-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the developers mailing list