no-arg constructor for structs (again)
deadalnix
deadalnix at gmail.com
Wed Sep 19 07:10:07 PDT 2012
Le 19/09/2012 15:24, Timon Gehr a écrit :
> I don't think making the use of optional parens affect semantics is an
> idea worth following.
I have to agree with that.
However, argument-less constructor is something required for struct. The
problem is raised on a regular basis on this newsgroup, and some
solution already have been proposed.
As discussed earlier in the reference thread, the compiler will have to
track down initialization at some point. A struct with an argument-less
constructor which isn't initialized must be an error. This will avoid
the () semantic dichotomy while solving that problem.
More information about the Digitalmars-d
mailing list