Bug 24813 – Some compiler error messages refer to default construction instead of default initialization

Status
NEW
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2024-10-14T19:43:53Z
Last change time
2024-12-13T19:38:07Z
Assigned to
No Owner
Creator
Jonathan M Davis
Moved to GitHub: dmd#20533 →

Comments

Comment #0 by issues.dlang — 2024-10-14T19:43:53Z
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.
Comment #1 by robert.schadek — 2024-12-13T19:38:07Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20533 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB