Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Tuples are being discussed, although I am unsure if it would be sufficiently useful. (Discussion here and here if you want to leave some thoughts)
Concerning the nested typedefs, yes, it's mainly just about nice code organization for me, but there are definitely other usecases where it's pretty essential, I'd say mostly in generic programming. I stumbled hard on this one: when writing a linked list - for each linked list variant, you have a node type, and a handle type that carries reference to the first node and other metadata like list length etc. . But you need to somehow be able to deduce the concrete handle type from the concrete node instance, so that the user can obtain handle instance by calling list_init() macro on the node and do other convenient stuff. Best solution I found so far how to solve this runtime-overhead-free in og GCC C is by defining zero-length array of the handle type inside the node type (like here) and then using __typeof__(node->_handle_typeinfo[0]) or something like that xDD, which is just so insanely ugly.