On Thursday, 12 May 2022 at 15:32:24 UTC, Adam D Ruppe wrote:
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.
Ah, yeah I know about that.