Can compiled routines call the interpreter?
The short answer to the question in your subject line is, “No, compiled routines cannot call interpreted routines.” I actually agonized over this one for a long time. Yorick’s model for its “virtual machine” has a lot of pieces that are aimed in this direction, but it turns out that, deep down Yorick is just not as introspective as a Lisp engine (something like Scheme could easily do what you are asking). It turns out there are many very subtle problems with doing this which would have impacted both the performance and the simplicity of the code. (I know it may not look simple, but believe me, it could have been a lot worse!) When tough choices arose, my rule was always to choose performance over elegance, simplicity, or anything else.
Related Questions
- At my middle school, sometimes I ask a DHH student to stay after class for a minute or two, but the interpreter is unable to stay longer than a few seconds because s/he has to dash to the next class. How can I speak privately with a DHH student when the interpreter always has to leave?
- If a teacher endangers a student, or otherwise breaks a local, state, or federal law, how will the interpreter handle that?
- In a language with a metacircular interpreter, how is the first program ever written compiled?