If I’m going to define a new alias, I want it to be easy to identify. This is the first one I have come across that allows for aliases to be defined, but only on a type by type basis.
It’s not so much the syntax of the statement that’s important, it’s the way in which it’s declared. In the statement above, the variable is declared as alias to an existing type.
alias is a special keyword that allows you to create a variable with the same name as another type. The keyword only has meaning when declared and used as a value. In this case it is declared as a variable that can be used with the type, such as int a(3), that is assigned to the variable, a. It is this declaration of an alias that allows it to be used as a variable to a type.
The above code shows the alias declaration. It should be noted that you do not need to declare aliases for each type – you can declare aliases for types at any moment.
Like most of the others, it’s easy to see the significance of this declaration. The only thing is that it doesn’t let you alias to a previously declared type. It only allows you to use it as if it’s a variable that is actually a variable of that type. When it is used in this way it is a type alias. I hope you get the point.
This statement allows us to use a type alias as if it was a variable. This is an extremely powerful tool and one that is used quite a bit. Here is an example.
I have a data type that is stored in a variable. This type is a struct (which is defined by the declaration below). I am a member of a class that has a member that has a public member that represents the struct type. The only way to define a member type is to create a member type of type struct type. This means that in most cases you can have a member type that has a member that has a member that has a member that has a member that does not.
You can define an alias to a data type by using the statement. In the following example, when we want to create an alias for the type of the pointer we create an alias for the type of the pointer. In the statement we create an alias to the type of the pointer. The type of the variable that holds the pointer is not changed.
The difference between an alias and an alias to a data type is that an alias to a data type is not bound to the type that it aliases to. So if you have an alias to a type, and you then use the statement to create an alias to a different data type, the alias to the original type is not bound to the new type.
There used to be a limit on how many aliases a variable could have, but the limit was removed for all variables. Instead you have to have an identifier that refers to exactly one alias. This is a little harder to do with pointers, but it does mean that you can now create aliases to the same data type multiple times.