Optional parameters?
Timoses
timosesu at gmail.com
Wed Apr 4 09:54:32 UTC 2018
On Wednesday, 4 April 2018 at 08:08:40 UTC, Dejan Lekic wrote:
> On Sunday, 1 April 2018 at 15:54:16 UTC, Steven Schveighoffer
> wrote:
>> I currently have a situation where I want to have a function
>> that accepts a parameter optionally.
>
> This is what function overloading and/or default values are
> for, right?
Not if you'd like to pass an actual _optional_ parameter for e.g.
an int.
Default parameter would actually assign a value.
See also:
https://forum.dlang.org/post/rzgcenuqiokknpsltlld@forum.dlang.org
More information about the Digitalmars-d-learn
mailing list