[mercury-users] Abstraction barrier
Michael Day
mikeday at yeslogic.com
Tue May 13 16:49:13 AEST 2003
> > Perhaps this way, and only provide accessor functions for magic_data that
> > require a magic_token to operate, such that even if the function returns
> > magic_data nothing can be done with it later?
I thought of another possibility:
:- pred foo(magic_data, T, T).
:- mode foo(ui, in, out) is det.
If magic_data must stay unique, then it can only be manipulated with
accessor functions that preserve its uniqueness and cannot be returned or
aliased. Sounds about right, but I expect the limitations of the
compiler's support for ui modes will be its undoing.
Michael
--
YesLogic Prince prints XML!
http://yeslogic.com/prince
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list