What programming language features are well suited for developing a live coding framework?

前端 未结 8 2283
孤城傲影
孤城傲影 2021-02-07 17:39

I would like to build a \"live coding framework\".

I should explain what is meant by \"live coding framework\". I\'ll do so by comparing live coding to traditional codin

8条回答
  •  耶瑟儿~
    2021-02-07 18:05

    The only thing that’s necessary to make this work is a form of dynamic binding, e.g., message passing in Erlang or eval in many other languages.

    If you have dynamic binding, then you can change the target of a message without affecting the message, or a message without affecting the target—provided that a target is defined when you try to send a message to it, and a message is defined for the targets to which you send it, when you send it.

    When changing a target, all you have to do is serve messages to the previous version until the new version is in place, then do a small locked update to transition to the new version. Similarly, when changing a message, you just serve the old version till the new one is available.

    Readily hot-swappable code must still be designed as such, however—the application must be modular enough that replacing the implementation of a component does not cause an interruption, and that can only come from careful programming.

提交回复
热议问题