Re: Storing data and code in a Db with LISP-like interface
Date: Sun, 23 Apr 2006 17:28:24 +0200
"Nick Malik [Microsoft]" <nickmalik_at_hotmail.nospam.com> wrote in
> "Neo" <neo55592_at_hotmail.com> wrote in message
>> 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