top | item 39039753

(no title)

pgen | 2 years ago

Great, but I hate these leading underscores.

discuss

order

injuly|2 years ago

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.

vkazanov|2 years ago

They will probably come with macro-based aliases, the same way they did it elsewhere.

flohofwoe|2 years ago

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.

Gibbon1|2 years ago

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.