← Back to context

Comment by uecker

16 hours ago

That way my plan, but the committee had concerns about type safety.

This would probably need some special rules around stuff like:

   typedef struct { ... } foo_t;
   typedef struct { ... } bar_t;
   foo_t foo = (bar_t){ ... };

i.e. these are meant to be named types and thus should remain nominal even though it's technically a typedef. And ditto for similarly defined pointer types etc. But this is a pattern regular enough that it can just be special-cased while still allowing proper structural typing for cases where that's obviously what is intended (i.e. basically everywhere else).

  • I agree, that is also the solution I suggested. I will try to bring this back for C2y.