typedef: what's it good for?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Nov 11 10:18:16 PST 2009


Matti Niemenmaa wrote:
> Andrei Alexandrescu wrote:
>> * typedef is hopelessly broken in very many ways
>>
>> * nobody noticed (i.e. no bugzilla reports), so probably nobody uses it
> 
> No Bugzilla reports? Here're just a few:
> 
> http://d.puremagic.com/issues/show_bug.cgi?id=632
> http://d.puremagic.com/issues/show_bug.cgi?id=1335
> http://d.puremagic.com/issues/show_bug.cgi?id=1344
> http://d.puremagic.com/issues/show_bug.cgi?id=1595
> 
> I use typedefs of integral types in one project, mostly because I read 
> the D spec when I started out and thought it'd be a good idea, but 
> because of 1335 and 1344 I eventually realized it wasn't such a good 
> idea after all.
> 
> I do still use them, but I wouldn't miss them much if they were gone.

Yeah sorry for exaggerating. I was mostly thinking that nobody seems to 
have noticed the problems with typedef for structs, built-in arrays, and 
pointers.

Andrei



More information about the Digitalmars-d mailing list