3 ms·
Fantastic article. I didn't know about this FP terminology but this seems to be a common, general concept. While reading it immediately reminded me of: (1) re
by dgb23 7y ago
Fantastic article. I didn't know about this FP terminology but this seems to be a common, general concept.
While reading it immediately reminded me of:
(1) re-frame (ClojureScript) and Redux (JavaScript), which are both web-frontend libraries for managing state and event handling. Browser events dispatch plain, serializable data instead of invoking behaviour directly, which are in practice tagged union types, kind of similar to the provided examples? (I'm not very familiar with the syntax in the article).
(2) it seems to be a common idiom in Rust to move branching logic into pattern matching and enumerations. So defunctionalisation is applicable here and is likely very common to refine Result types and defer execution.
(3) as user edflsafoiewq mentioned this is strongly related to the OO Command Pattern