Skip to content

Q: Is it possible to add byte code to device later during runtime? #121

@lll000111

Description

@lll000111

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions