Re:A half-hour to learn Rust
by Tehnix on Saturday February 29, 2020 @01:44PM
(#22452151)
I think no-op is a bit misleading, and throwing away is more precise, since Rust has strict evaluation.
let _ = timeConsumingFunction();
Still needs to spend time performing timeConsumingFunction(). It might not move, but it still did the work and produced a result, you are just not using it (and hence not need to move it).
If you you had lazy evaluation I would agree with your argument for the no-op terminology.
If you you had lazy evaluation I would agree with your argument for the no-op terminology.