Motive behind !empty() with front() instead of Optional front()
Per Nordlöw
per.nordlow at gmail.com
Fri Mar 26 09:10:28 UTC 2021
On Friday, 26 March 2021 at 08:49:30 UTC, Piotr Mitana wrote:
> Actually changing front() to return optionals would probably
> break many things. However, it could be handy to add a method
> called nullableFront or frontOrNull (and nullableBack or
> backOrNull for bidirectional ranges) to std.range.
Agreed. Alternative namings could be maybeFront or optionalFront.
More information about the Digitalmars-d
mailing list