Yes. But at the same time, defining a function via alias is a 1st class function, unlike a standard function definition!

alias af = (int x) => x;
auto sf(int x) => x;

auto v = af;
auto p = &sf;

This means that the definitions are not equivalent.

In essence, an alias function behaves like a lambda function assigned to a variable, but at the same time there is the possibility of adhoc overloading, which is only possible for a regular/standard function.

Reply via email to