🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #3359

Re: Atom-based module systems

#3359
From: Jeff Dalton
Date: Wed, 11 May 1988 14:05
30 lines
1779 bytes
In article <943@cresswell.quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes:
>In article <395@aiva.ed.ac.uk>, jeff@aiva.ed.ac.uk (Jeff Dalton) writes:
>> By saying call/1 is basically an EVAL, I meant that it brings in the
>> problems that EVAL does while APPLY does not.
>
>One extremely important problem that EVAL brings in which APPLY does not,
>and which call/1 does not bring in either, is the need for QUOTE.

Well, if that were true, R3RS Scheme would not need QUOTE, because it
doesn't have EVAL.  Lisp needs QUOTE even in cases like (CONS 'A 'B)
which don't involve EVAL.  Of course, Lisp could use some other
convention, such as a different type face, instead.  But EVAL doesn't
bring in the need for QUOTE: the need is already there.

One reason Prolog doesn't need QUOTE is that it uses another
convention (capitalization in Edinburgh Prolog) to distinguish
variables from constant symbols.

And, if we take a call/1-like APPLY, which can call fexprs, we
can define EVAL thus:

   (defun eval (expr) (apply #'if (list 't expr))) 

Can the analogous construction be made in Prolog?

Perhaps, though, you have in mind that if Lisp used some other
convention than QUOTE and then added EVAL it would also have to add
QUOTE.  I'll have to think about that.

-- Jeff
Technical Details
Message-ID: <424@aiva.ed.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!ukc!its63b!aiva!jeff
References: <136@vor.esosun.UUCP> <841@cresswell.quintus.UUCP> <365@aiva.ed.ac.uk> <395@aiva.ed.ac.uk> <943@cresswell.quintus.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!ukc!its63b!aiva!jeff
From: jeff@aiva.ed.ac.uk (Jeff Dalton)
Newsgroups: comp.lang.prolog
Subject: Re: Atom-based module systems
Message-ID: <424@aiva.ed.ac.uk>
Date: 11 May 88 14:05:16 GMT
References: <136@vor.esosun.UUCP> <841@cresswell.quintus.UUCP> <365@aiva.ed.ac.uk> <395@aiva.ed.ac.uk> <943@cresswell.quintus.UUCP>
Reply-To: jeff@uk.ac.ed.aiva (Jeff Dalton)
Organization: Dept. of AI, Univ. of Edinburgh, UK
Lines: 30