Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
Fast-Nop1623574dBecause they are reserved and must not be used by the application. From the C standard, chapter 7 Libraries, subchapter 7.3.1 Reserved identifiers:
— All identifiers that begin with an underscore and either an uppercase letter or another underscore are always reserved for any use.
— All identifiers that begin with an underscore are always reserved for use as identifiers with file scope in both the ordinary and tag name spaces.
Conclusion: you should not care about variables with underscore in any way, and you should not use them.
Google's C++ style guide has underscore at the end of a class member variable. Maybe underscore at the start is just a convention that some people use. An underscore at the start is sometimes even reserved.
RealKC120574dAs Fast-Nop said, _Ugly and __ugly are reserved for the implementation to use. _ugly identifiers are probably fine for private members of classes though and they're probably used for implementation details, which you shouldn't care for most of the time
rantsauce273873dI tend to name my functions which are not part of my application's public API with underscores in the beginning of the name to denote being private/not being used publicly.
Darkovernerd31873dI use it for class variables in c#, for example
private string _connectionString;
Your Job Suck?
Take a quick quiz from Triplebyte to skip the job search hassles and jump to final interviews at hot tech firms
Get a Better Job