Re:Js.js - A JavaScript interpreter in JavaScript
by AshleysBrain on Monday January 02, 2012 @07:12PM
(#3417998)
Page seems to be missing a "why?" section. Seriously, why? What does it do that eval() doesn't?
[ Parent
| on HN ]
Re:Js.js - A JavaScript interpreter in JavaScript
by stan_rogers on Monday January 02, 2012 @07:53PM
(#3418125)
It's similar to the metacircular Scheme interpreter in Scheme in SICP. It's not that interpreting JavaScript in JavaScript (especially if that JavaScript is running on a full-blown and more efficient interpreter itself) is a practical end, but that it demonstrates a concept: language as data and data as language. As an implementation, it is merely interesting -- but imagine writing code in a language closer to the problem domain you're working with that just happens to run on JavaScript.