What are (were) the most difficult parts of D?
Adam D Ruppe
destructionator at gmail.com
Thu May 12 15:32:24 UTC 2022
On Thursday, 12 May 2022 at 15:18:34 UTC, jmh530 wrote:
> What's the difference between a Type and Type Identifier?
The is expression roughly follows variable declaration style.
You write
int a;
to declare a new symbol named `a` of type `int`.
Similarly,
static if(is(T a))
declares a new symbol of type `a` if `T` is a valid type. (Of
course, in this case, a and T are aliases of each other, so it
isn't super useful, but in the more complex matches using the ==
and : operators, it might be different.)
The Identifier is optional.
More information about the Digitalmars-d-learn
mailing list