3 ms·
eval() calls the interpreter that's running the current code with some arbitrary string. The code that's interpreting it is not Javascript; you can't poke aroun
by roywiggins 12y ago
eval() calls the interpreter that's running the current code with some arbitrary string. The code that's interpreting it is not Javascript; you can't poke around and change it without recompiling whatever binary it is. Implementing Javascript in Javascript lets you quickly play with new features: you can add features to the toy interpreter more easily than nodejs.
There's a long tradition of self-hosting compilers: C is compiled with programs that were written in C. PyPy is a Python interpreter written in Python (actually RPython but it's a subset of Python).
http://en.wikipedia.org/wiki/History_of_compiler_construction#Self-hosting_compilers http://en.wikipedia.org/wiki/History_of_compiler_constructio...