Designated initializers to function argument
IchorDev
zxinsworld at gmail.com
Fri Jul 28 07:35:00 UTC 2023
On Tuesday, 11 July 2023 at 17:43:43 UTC, Steven Schveighoffer
wrote:
> On 7/11/23 11:22 AM, Ki Rill wrote:
>> On Tuesday, 11 July 2023 at 15:16:54 UTC, Ki Rill wrote:
>>> apply(Appearance(color: BLACK, strokeWidth: 4)); // other
>>> fields are default initialized: strokeOpacity, fillOpacity,
>
> Yes, I was going to reply that v 2.103 has added (stealthily)
> named parameters *as a partial implementation*. Included in
> this is struct initializers, and constructors and functions
> that are *not* templates.
>
> If you are willing to use DMD 2.103 and above, you should be
> good.
>
> -Steve
N-no way?! The spec makes no mention of them, is it really safe
to use them yet?
More information about the Digitalmars-d-learn
mailing list