October 14 [Issue 24813] New: Some compiler error messages refer to default construction instead of default initialization | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24813 Issue ID: 24813 Summary: Some compiler error messages refer to default construction instead of default initialization Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: issues.dlang@jmdavisProg.com When talking about disabling default initialization, the spec and the compiler talk about disabling default construction rather than disabling default initialization, whereas because structs in D do not have default constructors, and the way that they get their default value is different from what happens with default constructors in C++, we typically refer to what D has as default initialization (since normally, the default value for D structs comes from blitting their init value). As such, while default initialization is arguably a form of default construction insofar as they both provide the default value for a struct (or class in the case of C++), we normally refer to them as being distinct in order to show that the way that structs get their default value in D is different from C++, and referring to disabling default construction in the spec and in compiler messages risks confusing people. So, in order to be consistent with the terminology that we normally use and reduce the risk of confusing people with regards to default constructors and D, the compiler error messages should be changed to talk about disabling default initialization rather than disabling default construction. https://issues.dlang.org/show_bug.cgi?id=24805 is the corresponding issue for the spec. I discussed this with Walter, and he agreed to having the compiler messages be changed to refer to default initialization rather than default construction. -- |
Copyright © 1999-2021 by the D Language Foundation