Re: [stack] In praise of Prolog

Manfred Von Thun <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <C21DCF24.808%[email protected]>
Thanks for this, I had a vague suspicion that it might be so for
the Lisps. In fact for any interpreter written in some implementation
language it seems that the natural way to do it is to translate it into an
intermediate form from which the source cannot be retrieved. But one could
translate into a (passive) data structure which allows recovering the source
form and can also be interpreted.

On the two occasions when I tried to understand ³The Art of the Meta-Object
Protocol² (or similar), I failed to get the point. The meta-interpreters and
meta-compilers that I am writing now all look at the definitions of the
Joy-in-Prolog interpreter and do something with it. Maybe something will
click in my mind eventually. I was lucky having (re-)stumbled upon Prolog so
early.

On 11/3/07 7:31 AM, "John Cowan" <[email protected]> wrote:

> Manfred Von Thun scripsit:
> 
>> > Prolog (like Joy) has the wonderful capability of allowing one to look at
>> the 
>> > bodies of definitions (by "clause"), doing something with these bodies and
>> > constructing something that can later be executed (by "call"). Languages
>> such 
>> > as the Algol descendents cannot do this. I do not know whether (the
>> > interpreted implementations of) the Lisps can (John Cowan: ?).
>> > 
> Very few Lisps allow you to recover the source form of a definition from its
> executable form (decompiling), but essentially all allow you to evaluate
> source at run time, and some allow you to go from source to executable form
> at run time (compiling).  Even Lisp interpreters generally do at least some
> compiling (expanding macros, for example).




[Non-text portions of this message have been removed]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.