Explain function syntax
user1234
user1234 at 12.de
Sun Sep 21 20:33:11 UTC 2025
On Saturday, 20 September 2025 at 02:36:47 UTC, Steven
Schveighoffer wrote:
> What is a function type? It's the internal type that the
> compiler has for a function, which you actually cannot express
> in syntax.
Actually D has a syntax to expression function types:
```d
alias FT = void(int);
void v(int a){}
static assert(is(typeof(v) == function));
static assert(is(typeof(v) == FT));
```
More information about the Digitalmars-d-learn
mailing list