[mercury-users] What does logic buy us over pure functional programming?
Roy Ward
roy at videoscript.com
Mon Apr 30 22:23:38 AEST 2001
on 30/4/01 11:40 PM, Terrence Brannon at princepawn at earthlink.net wrote:
> 1 - reversable functions. In other words, it seems to be a wonderful
> thing to have a version of append that appends input to output, but
> also one which shows what input might have made the output. However,
> this is do-able in functional languages too.
Alongside this, predicates that can have multiple 'return'
values.
such as:
:- pred f(int::in, int::in, int::out, int::out) is det.
Most of the functional languages I have used only allow one
return value (There are exceptions to this, and my experience
with functional languages is not vast). Yes I know that you
can return structures encapsulating multiple return values,
but I really appreciate being able to do the above without
messing around.
I largely use Mercury as what I'd consider a functional
language (nearly all my code is det or semidet), but that
might be just my functional bias.
Cheers,
Roy Ward.
--------------------------------------------------------------------------
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