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

Per Nordlöw per.nordlow at gmail.com
Tue Apr 6 20:34:08 UTC 2021


On Tuesday, 6 April 2021 at 02:14:17 UTC, Paul Backus wrote:
> Here's what the generic identity function *would* look like if 
> `ref` were a type qualifier:
>
>     T identity(T)(T arg)
>     {
>         return arg;
>     }
>
> I rest my case.

So what was the motive for not making it a type qualifier in D?

And what are the obstacles for making it that?


More information about the Digitalmars-d mailing list