hana icon indicating copy to clipboard operation
hana copied to clipboard

Please document hana::transform side effect ordering

Open dcolascione opened this issue 6 years ago • 1 comments

GCC appears to evaluate transform function calls out of order, which I think it's allowed to do because function argument evaluation order is undefined. Hana should explicitly document the lack of ordering guarantees in transform.

dcolascione avatar May 22 '19 18:05 dcolascione

It is documented in the manual here: http://boostorg.github.io/hana/index.html#tutorial-algorithms-effects

The issue with documenting it for hana::transform itself is that each data-type can have it's own implementation that behaves differently. I'm guessing the one you are considering is for any hana::Sequence.

Take a look at the algorithms for hana::Monad.

ricejasonf avatar May 22 '19 19:05 ricejasonf