Bug 19595 – Formally define aggregate type in documentation
Status
RESOLVED
Resolution
INVALID
Severity
enhancement
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-01-19T15:42:41Z
Last change time
2019-01-19T15:48:44Z
Assigned to
No Owner
Creator
Nathan S.
Comments
Comment #0 by n8sh.secondary — 2019-01-19T15:42:41Z
An aggregate type is a struct, union, class, interface, or enum whose base type is one of those. It would be helpful to document this; it isn't obvious merely from the name that all of those are "aggregates" but not array slices (pointer and length) or delegates (function pointer + context pointer) or static arrays or associative arrays.
If there is some precise sense of "aggregate" that makes it obvious what this category means it would be useful to insert that but I'm not sure if I see it. All aggregate types are things that are capable of having `alias this` but I'm not sure if that's related to the definition or incidental.
Comment #1 by n8sh.secondary — 2019-01-19T15:48:44Z
Closing as invalid, for some reason I didn't find the definition before. Although probably the phrase "Delegates are an aggregate of two pieces of data" (https://dlang.org/spec/type.html) should not be used if delegates are considered "derived types" rather than "user-defined types" and only the latter are considered aggregates.