[mercury-users] higher order modes

Michael Day mcda at students.cs.mu.oz.au
Tue Sep 12 18:49:32 AEDT 2000


> Would you want the compiler to do the same conversion implicitly
> if the argument (or return value) was a list of predicates, rather
> than just a single predicate?

Oh, good point. That way lies madness or inconsistency.

> Another alternative would be to represent closures of all determinisms
> in the same way, so that no representation conversion would be needed [*].
> Then it would be OK for the mode checker to allow such code.
> However, this alternative would involve a small performance cost,
> which would be contrary to the goal of ensuring that users don't pay for
> features that they don't use.  It might perhaps also complicate
> interoperation with other languages that support closures.

This was more what I had in mind, though I am completely ignorant of the
performance implications.

Oh well, guess I just need more practice deciphering mode errors.
Incidentally, do true and fail exist in any real form anywhere? As I can't
seem to return them in lambda expressions.

Michael
--------------------------------------------------------------------------
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