[net.lang.prolog] Whose Reality?

andrewt@basser.SUN (Andrew Taylor) (03/19/84)

I find some of the statements in Fernando Pereira's discourse on
the "Realities of Prolog implementation" hard to swallow.

Here are some of the more interesting.

	1.  It is rather difficult to write a good, elegant and
	space-efficient Prolog INTERPRETER in anything but Prolog,
	witness the fact that most Prolog INTERPRETERS are either VERY
	slow, space-extravagant, or have minimal debugging facilities.

I have written (what I consider) a good, elegant and space-efficient
prolog interpreter in C. It offers almost the same debugging (and other)
facilities as DEC-10 Prolog.

	3.  C is a poor language to implement elegantly and efficiently
	interpreters for tagged languages like Prolog.

This is what we in Australia call bullshit. C is an ideal language
for writing a good, fast interpreter and indeed quite a few such
interpreters have been written. I can not see any reason why prolog
should be any different. Indeed, as I said above, I have proof of this.

	2.  Moral: if you want a good and elegant Prolog interpreter, write
	first a Prolog compiler and then write the interpreter in Prolog

Unfortunately I don't believe that this is true. You may be able to
produce an elegant prolog interpreter in prolog. However your
interpreter will not be as fast or as space-efficient as a well written
one in a language such as C. Hopefully this situation will eventually
change.

Fernando gives a detailed explanation of how and why C-Prolog 
was developed. I never disputed that for the effort involved
the production of C-Prolog was a probably a good idea at the time.
Its many users testify to  this. But as Fernando says C-Prolog is
only a stop-gap system. I think we need better software. This
may involve much work but someone has to do it.

Fernando seems to show disdain for "academic" elegance in software.
I (and many others) believe that elegant coding and good software
go hand in hand.  I understood the great success of Unix was largely
due to the elegance of its design and implementation. I don't think
Ritchie & Thompson concerned themselves with "useful local maximums
on the effort/benefit curve".

				Andrew Taylor

				...decvax!mulga!andrewt:basser