3 ms·
Looks like the author is 're-functionalising' (as opposed to https://en.wikipedia.org/wiki/Defunctionalization https://en.wikipedia.org/wiki/Defunctionalization
by chriswarbo 5y ago
Looks like the author is 're-functionalising' (as opposed to https://en.wikipedia.org/wiki/Defunctionalization https://en.wikipedia.org/wiki/Defunctionalization ).
Defunctionalised programs pass around a simple data type, which is branched on in various places to implement different behaviours. Re-functionalised programs pass around different behaviours (as functions, or objects if you insist) which are called in various places.
Neither form is strictly better than the other; it depends on the problem we're trying to solve.