[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scheme in prolog

Tim Finin says "It is very difficult to implement an efficient
interpreter for a language which has side-effects in prolog," while mike
beckerle says "No more difficult, I think, than interpreting a language
with side-effects in a language without side effects."

Notice that Tim says "efficient" and mike doesn't.  I think that much of
the argument hinges on this point.  Just to muddy the waters I want to
bring up a paper in the 2nd international logic programming conference
(1984) called "Mutable arrays in Prolog" (or some such).  The paper
essentially presents a naive implementation of arrays in Pure Prolog
where every write copies and a read entails a linear search.  It then
goes on to describe a primitive implementation of the predicates for
creating and accessing arrays.  The primitive implementation in some
cases actually had the same computational complexity as array primitives
in conventional languages.  Is there any specification of Prolog which
would rule out a compiler that did such optimizations?

The point is that something is wrong with the question of whether one
language can EFFICIENTLY implement another.  One can ask whether a
particular implementation of a language can efficiently implement
another.  A more interesting question I think is whether one language
can EASILY and NATURALLY implement another.

- ken kahn

	mike%acorn@LIVE-OAK.LCS.MIT.EDU's message of Tue, 7 Apr 87 19:38:00 EST
-- scheme in prolog