[mercury-users] Abstract/partial inst's in interfaces.

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Oct 21 05:29:39 AEST 1998


On 20-Oct-1998, Ralph Becket <rwab1 at cam.sri.com> wrote:
> Say I have an interface which declares types and predicates which are
> implemented using, say, unique arrays.  I can hide the type
> information, but I can't really hide the inst information.  The
> interface still has to use modes like array_di and array_uo.  While
> users of my module can't exploit this information, it niggles me that
> some info. about my implementation seems to be escaping into the
> interface.  I haven't thought too hard about this, but is there scope
> for the inclusion of abstract or partially revealed insts and modes in
> the language?

The short answer to this one is that having thought moderately hard about
this, we agree with you in principle -- but the devil is in the details.

Fully abstract insts don't really work, because there's little you can
do with a value whose inst is abstract.  Partially revealed insts could
work, but that would be a bit more complicated, and it's arguable as to
whether the complication is really worth it for what is after all a
fairly minor niggle.  Perhaps we will look at this in more detail
sometime in the future, but thus far, at least, we have had plenty
more important fish to fry.

Cheers,
	Fergus.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.



More information about the users mailing list