Wed Dec 25 19:11:36 CET 2019
To they are useful due to lack of intermediate data structures.
However they likely have an imperative implementation where it is more
work to guarantee constraints.
It makes sense to do this for
1) protocols that are already very imperative or incremental 1by
nature, and for
2) low-memory targets, which also tend to be very imperative
I think the conclusion is that structured data types are expensive.
The world is made out of state machines. Stick to that level and code
is going to be small.
It seems possible though to generate these things. Generate
But really, why does it work so well? Because explicit data
structures are replaced by folds.
Morale: REPLACE STRUCTURE BY ITERATION