Motive behind !empty() with front() instead of Optional front()

Per Nordlöw per.nordlow at gmail.com
Tue Mar 30 20:26:18 UTC 2021


On Tuesday, 30 March 2021 at 00:51:44 UTC, Andrei Alexandrescu 
wrote:
> Efficiency. It would be impossible to iterate an array as a 
> range without copying each and every element thereof.

Most likely affects performance in non-release mode, at least.

I wonder what the generated assembly looks like in Rust for a 
similar case...


More information about the Digitalmars-d mailing list