2 ms·
Does this approach avoid function coloring? That is: do legacy calls of functions containing yield instructions just treat these as nop?
by singularity2001 3y ago
Does this approach avoid function coloring? That is: do legacy calls of functions containing yield instructions just treat these as nop?
- lapinot 3y agoThis will never happen, "legacy call" of functions manipulating the control stack in weird ways can never be meaningful. OTOH the reverse is not always true but a good system should have it: transparent recasting of pure code as effectful code. In other words, the problem that should be solvable but isn't always is that you should be able to "await" a pure function. Or more generally, transparent subtyping of less effectful code into more effectful. Subtyping isn't easy but it's also not impossible if you think about it early enough during the design.