4 ms·
Are there any examples of C++ text/streaming libraries implementing fusion in a similar way?
by jpcooper 6y ago
Are there any examples of C++ text/streaming libraries implementing fusion in a similar way?
- ergl 6y agoNot that I'm aware, although I spotted this one on github: https://github.com/mikea/cpp-stream-fusion https://github.com/mikea/cpp-stream-fusion, based on a paper discussed at the time on HN: https://news.ycombinator.com/item?id=5507204 https://news.ycombinator.com/item?id=5507204 Stream fusion (or deforestation, in general) is useful in languages that encourage function composition. For that, functions must receive and return a value that can be composed together. In my experience, languages in the style C or C++ encourage functions that modify the argument in place (caller supplies their own buffer, for example), which bypasses the problem of creating intermediate copies of the final result.