Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Correct, complex types must be typedef'd. At least, until c2y integrates _Record as per N3332: https://thephd.dev/_vendor/future_cxx/papers/C%20-%20_Record...


I am not terribly excited about this proposal. It is overly complex.


I agree, but the current specification is complex too: two identical "tagged" structs are compatible, two identical "untagged" structs are not. And before C23 it was even worse, depending on whether the two structs were defined in the same file or not.

We're applying a patch over a patch over a patch... no surprise the end result looks like a patchwork!


Sure, but _Record would add even more complexity. The tag rules I had changed in C23 were a step to remove complexity, so a step towards cleaning it up. I wasn't able to fix the untagged case, because WG14 had concerns, but I think these can be addressed, making another step. It is always much harder to undo complexity than to add it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: