Optional parameters?

Boris-Barboris ismailsiege at gmail.com
Sun Apr 1 22:37:17 UTC 2018


On Sunday, 1 April 2018 at 22:25:45 UTC, Jonathan M Davis wrote:

> How would a pointer help? Instead of doing
>
> foo(nullable(42))
>
> he'd have to do
>
> foo(new int(42))
>
> which is just one character shorter and ends up allocating on 
> the heap, unlike with Nullable.
>
> - Jonathan M Davis


foo(&x);




More information about the Digitalmars-d-learn mailing list