🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #5767

Re: Unification of Paradigms

#5767
From: Subash Shankar
Date: Wed, 21 Sep 1988 02:41
23 lines
1703 bytes
In article <3923@okstate.UUCP> norman@a.cs.okstate.edu (Norman Graham) writes:

>in as well.  Logic languages only seem to provide syntatic sugar
>for a handful of functions easily written in the above language.
>|-: Don't flame me for that last statement.  If it's incorrect
>just write it off as a statement by a logic programming novice and
>explain why it ain't so. :-| 


Logic is not merely syntactic sugar on top of functions.  First, unification
is much more general then function invocation, for obvious reasons.  This
gives logic added expressive power.  Second, a logic predicate is reversible
(i.e. it can be "solved" for any combination of arguments bound), while 
functions have prespecified input and output arguments.  Again, this adds
expressive power since in the worst case you would need 2^n functions for
each logic predicate where there are a total of n inputs and outputs.
 
Finally (although I'm sure there are other reasons around), the nature of 
the logical variable is more amenable to lazy evaluation and other such
niceties.  

Now, if you were to say that functions only provide syntactic sugar for a
handful of predicates written in logic languages, I would probably agree :-)
Technical Details
Message-ID: <8943@srcsip.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!uwvax!umn-d-ub!nic.MR.NET!shamash!nis!ems!srcsip!shankar
References: <3923@okstate.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!uwvax!umn-d-ub!nic.MR.NET!shamash!nis!ems!srcsip!shankar
From: shankar@srcsip.UUCP (Subash Shankar)
Newsgroups: comp.lang.misc
Subject: Re: Unification of Paradigms
Message-ID: <8943@srcsip.UUCP>
Date: 21 Sep 88 02:41:44 GMT
References: <3923@okstate.UUCP>
Reply-To: shankar@columbus.UUCP (Subash Shankar)
Organization: Honeywell Systems & Research Center, Camden, MN
Lines: 23