Newsgroups: rec.arts.int-fiction
Path: nntp.gmd.de!Dortmund.Germany.EU.net!main.Germany.EU.net!EU.net!howland.erols.net!netcom.com!erkyrath
From: erkyrath@netcom.com (Andrew Plotkin)
Subject: Re: Why you must use Prolog
Message-ID: <erkyrathDznnEK.D1L@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
X-Newsreader: TIN [version 1.2 PL1]
References: <54g91v$j2q@prometheus.acsu.buffalo.edu> <54gbrh$e3g@cheatum.frontiernet.net> <54gjrl$ote@prometheus.acsu.buffalo.edu> <baf.845936561@max.tiac.net>
Date: Tue, 22 Oct 1996 02:11:07 GMT
Lines: 38
Sender: erkyrath@netcom16.netcom.com

Carl Muckenhoupt (baf@max.tiac.net) wrote:

> Now this is an interesting line of thought.  Anything that can make
> it easier to code NPC's with believable behavior is a Good Thing.
> Unfortunately, I know very little about Prolog other than its
> ideology.  How feasable would it be to write a Prolog-to-Z-code
> compiler?  I suggest it as a way do give any Prolog games you may
> write a widely-portable standard compiled format.  (Mind you, this
> would be a different project from writing a Prolog interpreter in
> Inform, as someone has suggested.

The last time I used Prolog was, uh, 1990? But I think you're actually
incorrect; Prolog is a dynamic language (meaning that functions are built
and mangled as the program executes, not just at compile time. Rather
like, well, Lisp, to pick a common example.) You pretty much can't
translate a dynamic language program into source code for a procedural
language like Inform (or C.) I mean, you can compile parts of the program
as an optimization, but there will always be the interpreter core sitting
down at the bottom. 

In fact, when I took that wacky computer language course back in 
199-early, my conclusion was "Prolog is not a language; it's a unusually 
funky database. You don't write programs, you create sets of data for the 
database engine to process." Which tells you how much I enjoyed that part 
of the course -- heh -- but the point is, there's no distinction between 
a Prolog-to-Inform converter and a Prolog interpreter written in Inform.

Efficiency is another issue (which Phil Goetz raises in another post.) 
Any interpreter running on the Z-machine is going to be miserably slower 
than an interpreter written in native code. If the bottleneck is 
computation, anyway.

--Z

-- 

"And Aholibamah bare Jeush, and Jaalam, and Korah: these were the
borogoves..."
