D grammar oddities
Paul Backus
snarwin at gmail.com
Tue Nov 17 00:24:20 UTC 2020
On Monday, 16 November 2020 at 23:55:29 UTC, Dibyendu Majumdar
wrote:
> struct and unions aren't types.
> function and delegate are not either.
>
> According to the grammar.
A struct declaration *creates* a type, but it is not, itself, a
type. When you declare `struct MyStruct { /* ... */ }`, the type
that's created is just called `MyStruct`--which means that,
grammatically, the type is an identifier.
More information about the Digitalmars-d
mailing list