Re: Storing data and code in a Db with LISP-like interface

From: Nameless <news.mail_at_chello.no>
Date: Sun, 23 Apr 2006 17:28:24 +0200
Message-ID: <q2N2g.9820$zc1.3391_at_amstwist00>


"Nick Malik [Microsoft]" <nickmalik_at_hotmail.nospam.com> wrote in message news:D6qdnX2y2JCWHtfZRVn-sQ_at_comcast.com...
> "Neo" <neo55592_at_hotmail.com> wrote in message
> news:1144986888.222283.143660_at_z34g2000cwc.googlegroups.com...
>
>> Below is a simple example that stores a person named John who
>> likes Mary and then finds who John likes. Could you or someone
>> familiar with Prolog show how to do this. Later I would like
>> to extend the example to distill Prolog's fundamental forte
>> (and possible weakness in representing things).
>
> Get ready for a really long program!
>
> likes(john, mary).
>
> That's it.
>
> The query looks like this:
>
> ?- likes(john, Who)
>
> the response is:
>
> Who = mary
>
>
> Not much to it really.
> I guess it is only interesting in the fact that your language takes about
> 30 lines to do what Prolog does in, what, one?

Then that language must be particularly verbose; the size of a Prolog program is generally considered to be 10% that of a comparable imperative one (C, Pascal etc.).

-- 
Mail sent to this email address is deleted unread
on the server. Please send replies to the newsgroup. 
Received on Sun Apr 23 2006 - 17:28:24 CEST

Original text of this message