-
Notifications
You must be signed in to change notification settings - Fork 252
Description
First, is there a forum? Mailinglist? Because this is not an issue, this post should/would be posted to a forum, if there was one.
I just read your blog post from 2018 with the reasoning behind your attitude against eval. Which is all obvious and fine - except that I'm missing one use case: Updating or exchanging code during runtime. I'm not talking about bug fixes, but about (possibly just) temporary modules added (and removed) at some point during runtime. For example, we have a use case for LED lighting systems with many communicating IoT devices controlling lamps and one could just let users add "light methods" later. Those modules don't have to be thought of in advance of deploying the lamps. I think this is exactly one of the string points of a JS engine: Code can be updated (added to) any time.
To the question of the subject line: Obviously, given that eval is supported now, your blog post point about the use of meager on-device resources to compile new scripts is true, so how about adding byte code precompiled on the developer machine instead of JS code? The main point above is not that it has to be "JS" (text code), but that it can be done during runtime.