Elektrine lite

← Feed

@slomo@toot.cat

Post #2598503

2023-03-19 09:20 UTC

@saagar@federated.saagarjha.com Right, so why not a) specify it (so at least the order of the side-effects that don't affect each other is not random), and b) disallow code where the order actually matters (side effects of one part of the expression affecting another one)? For optimizations, I'm still waiting for an example where this actually allows any kind of useful optimization that is not possible otherwise. If you have one, please let me know 🙂​ That both gcc and clang rely on one fixed order seems like a hint that there is actually not much opportunity for using this for optimizations.

Replies (1)

  • @slomo@toot.cat b) is very difficult to do generally, since most programming languages don’t have a way of specifying effects to the extent that would be necessary here. (How can you guarantee that two function calls–which may call more things–don’t interfere with each other at all?)

    Open ##2598504