@saagar@federated.saagarjha.com
Post #2598496
2023-03-19 08:53 UTC
@slomo@toot.cat > Fortunately another thing Rust got right: argument evaluation is explicitly defined as left-to-right.
Did it, though? Sounds like the right thing to do here is to keep the order unspecified and have your compiler warn if you try to rely on it
Replies (2)
-
@slomo@toot.cat 2023-03-19 09:02
@saagar@federated.saagarjha.com Why would you want to keep the order unspecified though? But as I mentioned elsewhere, the code in question wouldn't compile at all with Rust for other reasons. Not just a warning.
-
@bugaevc@floss.social 2023-03-19 09:26
@saagar@federated.saagarjha.com @slomo@toot.cat but how could the compiler possibly know whether you're relying on it or not? (But I'm not convinced that just specifying LTR is "fixing it" either.)