2 ms·
I'd argue the difference between the two isn't just "a little harder", and is not the same as your function call example: in most languages, you can't or can't
by detaro 8y ago
I'd argue the difference between the two isn't just "a little harder", and is not the same as your function call example: in most languages, you can't or can't always access the source of a function you've been passed, so the code would need to be passed as text. If you define a subset of JS you accept, you've created a DSL. This can be a completely valid way of creating one, and if you actually want to fully interpret it picking something where you can bind a high-quality existing interpreter makes sense, but custom ones have their strengths too, especially if you otherwise would cross paradigms (e.g. the examples in the article seem clearly more like a declarative language).