[Issue 24805] New: The spec should not refer to default initialization as default construction when discussing disabling it
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Oct 11 18:32:54 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24805
Issue ID: 24805
Summary: The spec should not refer to default initialization as
default construction when discussing disabling it
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dlang.org
Assignee: nobody at puremagic.com
Reporter: issues.dlang at jmdavisProg.com
The language allows us to disable default initialization - e.g.
---
struct S
{
int x;
@disable this();
this(int v) { x = v; }
}
---
and the https://dlang.org/spec/struct.html#disable_default_construction section
of the spec discusses this. However, it incorrectly talks about disabling
default construction instead of discussing disabling default initialization. As
default construction is not a thing with structs in D in the first place, the
terminology used in this part of the spec is just plain wrong and risks
confusing people. The spec should be updated to talk about disabling default
initialization instead.
--
More information about the Digitalmars-d-bugs
mailing list