alias: Shortening a Long Name
Let’s learn how an alias can be used for shortening a long name.
We'll cover the following...
alias
The alias
keyword assigns aliases to existing names. alias
is different from and unrelated to alias this
.
Shortening a long name
As discussed previously, some names may become too long to be convenient. Let’s consider the following function:
Stack!(Point!double) randomPoints(size_t count) {
auto points = new Stack!(Point!double);
// ...
}
Having to type Stack!(Point!double)
explicitly in multiple ...