3 ms·
More real-life cases. The classic cases like compilers are covered enough, but I think we could use more examples in a wider range of domains. For those who use
by sriku 7y ago
More real-life cases. The classic cases like compilers are covered enough, but I think we could use more examples in a wider range of domains. For those who use it, I think it feels like second nature and perhaps even "it's not a big deal really", but the duality is critical for building flexible systems. It's only a feeling I have at this point though.
I can offer a small example to start with. Steller [1] - is a sound modeling library that's written primarily as higher order functions. It however exposes a "specFromJSON" function [2] that offers a serialization through (informal) defunctionalization.
[1] https://github.com/srikumarks/steller https://github.com/srikumarks/steller
[2] https://github.com/srikumarks/steller/blob/master/src/steller/scheduler.js#L1156 https://github.com/srikumarks/steller/blob/master/src/stelle...