alias: Design Flexibility
Find out how an alias can be helpful in design flexibility.
We'll cover the following...
We'll cover the following...
Design flexibility
For flexibility, even fundamental types like int can have aliases:
D
alias CustomerNumber = int;alias CompanyName = string;// ...struct Customer {CustomerNumber number;CompanyName company;// ...}void main() {}
If the users of this struct always type CustomerNumber and CompanyName instead of int and string, then the design can be changed in the future to some ...