Re: Can anyone explain this
"Abdallah, Samer" <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
On 7 Mar 2014, at 17:10, Daniel Lyons <[email protected]> wrote: > This behavior is one of the defining characteristics of Prolog. We seem > to love foisting failure-driven loops on beginners, but eventually we > all get sick of them and turn to recursion and higher-order functions, > which have cleaner compositional semantics and don't feel quite so much > like an abuse of power. I agree. But Paul Tarau seems to think they have their merits -- see the following: P. Tarau and B. Demoen. Higher-order programming in an or-intensive style. CW Report CW192, 1995. Basically, he argues that iteration via repeated failure can sometimes run faster than iteration via recursion because it can avoid repeated term structure initialisation. Samer. > -- > Daniel Lyons > _______________________________________________ > SWI-Prolog mailing list > [email protected] > https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 495 bytes Desc: Message signed with OpenPGP using GPGMail URL: <https://lists.iai.uni-bonn.de/pipermail/swi-prolog/attachments/20140307/70cd48be/attachment.bin>