Hacker News new | ask | show | jobs
by pgen 886 days ago
Great, but I hate these leading underscores.
5 comments

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.
They will probably come with macro-based aliases, the same way they did it elsewhere.
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.

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.
Me too.