Eloquent Javascript: a compiler for the Egg programming language

In the chapter 12 of the book:

It would be possible to write an alternative evaluation strategy for Egg, one that first converts the program to a JavaScript program, uses Function to invoke the JavaScript compiler on it, and then runs the result. When done right, this would make Egg run very fast while still being quite simple to implement.

If you are interested in this topic and willing to spend some time on it, I encourage you to try to implement such a compiler as an exercise.

I’ve implemented one. Although it works there are some workarounds I don’t like. If some one has done it or has any thoughts about the topic please share.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.