Path: news.daimi.aau.dk!news.uni-c.dk!sunic!sunic.sunet.se!newsfeed.tip.net!news.seinf.abb.se!eua.ericsson.se!erinews.ericsson.se!cnn.exu.ericsson.se!convex!bcm!cs.utexas.edu!howland.reston.ans.net!xlink.net!rz.uni-karlsruhe.de!news.uni-stuttgart.de!news.belwue.de!news.belwue.de!fu-berlin.de!zrz.TU-Berlin.DE!lise!wpp From: wpp@lise.physik.tu-berlin.de (Kai Petzke) Newsgroups: comp.lang.beta Subject: Re: combining interpreted and compiled beta Date: 8 May 95 22:33:11 GMT Organization: Technical University Berlin, Germany Lines: 52 Message-ID: References: <3odc7a$dac@belfort.daimi.aau.dk> NNTP-Posting-Host: lise.physik.tu-berlin.de Hans Erik Martino Hansen writes: >Why not combine the two things in beta, the idea is as follows: >Compile a complete beta interpreter into the executable. >The interpreter loads the fragments which have changed or is affected by a >change since the compilation. Calls to the changed code is then redirected >to the interpreter. I am currently writing a freeware BETA compiler, or more precise, a freeware BETA to C translator. In the beginning, I had a plan similiar to your idea, that the compiler should also be useable as an interpreter. I have mostly given up that plan. The problem is, that BETA declarations are very versatile, and when you scan them, you have to be *very* carefull about what you do in what order. Just look at the following piece of BETA: X: @A; A: (# method: (# do INNER #); el: @X.method #); An interpreter sees first the "X: @A" attribute. It will then look for the pattern A, and start setting up an object of A. While doing so, it sees the "el: @X.method" attribute. This requires the interpreter to dereference an object, that it has not even yet assembled completely. These and other features of BETA make it hard to interprete it in a strictly sequential fashion. The alternative would be to let the interpreter resolve the most complicated expressions and declarations, before it executes any code. But this resolution, called "checking" by the Mjolner BETA compiler, is a substantial fraction of the total compile time. The resolving interpreter would not be much faster than the compiler. Kai -- Kai Petzke | How fast can computers get? Technical University of Berlin | Berlin, Germany | Warp 9, of course, on Star Trek. wpp@marie.physik.tu-berlin.de |