[rescue] Mainframe on eBay

Phil Stracchino phil.stracchino at speakeasy.net
Fri Sep 23 22:33:35 CDT 2005


Jonathan C. Patschke wrote:
> On Fri, 23 Sep 2005, Phil Stracchino wrote:
> 
> 
>>Oh, sure, you can write an interpreted language interpreter in an
>>interpreted language .... but NOT in the same one.
> 
> 
> Why not?  Assuming the language implemented by the "parent" interpreter
> is reasonably complete (ie: Turing complete), you can implement anything
> in it.
> 
> 
>>You have to run the interpreter to interpret the code in order to run
>>the interpreter to...
> 
> 
> No, you run the interpreter to interpret the code, and the interpreter
> runs in the parent interpreter's scope.  That the interpreter is written
> in the same language that it is interpreting is merely of academic
> interest.  The "parent" interpreter has no idea that the program it's
> running is also interpreting commands in the same language.
> 


Well, I suppose, if you want to have multiple interpreters for the same
language.  OK, it's technically *possible*, so long as the parent -- or
grandparent, or great-grandparent, etc -- the *first* interpreter for
the language -- is written in something else.  it's just not usually a
good idea.  :)


-- 
 Phil Stracchino       phil.stracchino at speakeasy.net
    Renaissance Man, Unix generalist, Perl hacker
 Mobile: 603-216-7037         Landline: 603-886-3518



More information about the rescue mailing list