[mercury-users] Higher order (was The Logic of Mercury)
Thomas Conway
conway at cs.mu.OZ.AU
Fri Sep 10 14:31:54 AEST 1999
On Fri, Sep 10, 1999 at 09:18:22AM EST, Richard A. O'Keefe wrote:
> The important thing in this thread is that stashing a token in a data
> structure instead of stashing a closure doesn't help. In fact, it can
> make things worse.
OTOH, Lee's proposal is useful in Mercury because the token can quite
happily be given an inst `ground', where as a closure, to be called
must have a `pred(ArgModes) is Determinism' inst which is a subtype
of `ground'. The problem with it is more to do with extensibility and
modules. Consider again the example I showed earlier where the closures
were stored in a "function table". If I have an access predicate for
registering a new function, then any client can add a new function. If
I have to define a type for the `token', then modularity becomes a problem
since Mercury doesn't allow distributed types or predicates.
Thomas
--
Thomas Conway )O+ Every sword has two edges.
Mercurian <conway at cs.mu.oz.au>
--------------------------------------------------------------------------
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