3 ms·
You could do that already. You can compile code at runtime from binary (self modifying code) if you need or you could extract that into several dynamically comp
by yetihehe 7y ago
You could do that already. You can compile code at runtime from binary (self modifying code) if you need or you could extract that into several dynamically compiled modules and call them based on argument.
BUT
Different versions of code in memory - that sounds like nightmare to debug. Erlang already stores two versions of newly compile code, old one for processes currently actively using that code and new one for all others. Once all processes jump to new code (by exiting from old function module or calling into new version with module:function call) old code is purged.