Defaut initialization of structs
Per Nordlöw
per.nordlow at gmail.com
Mon Oct 13 10:44:58 UTC 2025
Given a `struct S` is, `S()` always equivalent to `S.init`? I
wonder which is preferred in an (parameter default value)
expression that should evaluate to the default value of `S`.
I would like to use `S()` as its shorter to type than `S.init`
but I'm uncertain whether it can trigger execution of code
despite D disallows nullary constructors.
More information about the Digitalmars-d-learn
mailing list