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