Andrei Alexandrescu:

> Walter's and my interim conclusion last night was that fixing typedef 
> would be difficult, and that the usefulness of typedef is too little for 
> its complexity. It may be a good idea to just remove it from the 
> language.

An usage of typedef:
alias int[5][20] TyMat;
typedef Mat TyMatA;
typedef Mat TyMatB;

Now a function can take both a TyMatA and TyMatB matrix, and the type system 
helps you to not confuse one for the other when you pass them around.

If typedef gets removed from D, will the "typedef" keyword removed from the D 
language?

Bye,
bearophile

Reply via email to