News for hackers. Stuff that matters.
Re:Polymorphic Types in C [pdf] by pgen on Thursday January 18, 2024 @04:28AM (#39039753)
Great, but I hate these leading underscores.
Re:Polymorphic Types in C [pdf] by injuly on Thursday January 18, 2024 @04:34AM (#39039783)
It's for backwards compatibility of C compilers (and lack of proper namespaces). All identifiers starting with an underscore are reserved for use by compiler intrinsics and such. Although most compilers don't complain if your variable names start with a leading underscore, it is recommended to not have such identifiers in your code.
Re:Polymorphic Types in C [pdf] by flohofwoe on Thursday January 18, 2024 @05:16AM (#39040050)
This is so that the new keywords don't collide with existing code (the combination of underscore followed by a capital letter is reserved). For instance until C23, 'bool' was actually called '_Bool' internally.

Just as with stdbool.h before, there could be a stdlib header which wraps those internal names into something more human-friendly.

Re:Polymorphic Types in C [pdf] by vkazanov on Thursday January 18, 2024 @04:41AM (#39039833)
They will probably come with macro-based aliases, the same way they did it elsewhere.
Re:Polymorphic Types in C [pdf] by Gibbon1 on Thursday January 18, 2024 @04:59AM (#39039929)
I feel increasingly annoyed with the idea that C can never have new keywords. As if that's some sort of huge problem with existing code bases.
Re:Polymorphic Types in C [pdf] by uecker on Thursday January 18, 2024 @01:24PM (#39045501)
Me too.