4 ms·
typedef, in spite of the name, doesn't create a new type. It only creates a new name for an existing type. Changing that would break existing code. I wouldn't
by _kst_ 7y ago
typedef, in spite of the name, doesn't create a new type. It only creates a new name for an existing type.
Changing that would break existing code.
I wouldn't mind seeing a new feature that does define a new type (one that's identical to, but incompatible with, an existing type), but we can't call it "typedef".
In a sense that feature already exists. You can define a structure with a single member of an existing type. But you have to refer to the member by name to do anything with it.