Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
On Open Zeppelin's ERC20 BasicToken contract the variable totalSupply_ follows a naming convention I haven't seen before.
Is that to differentiate it from the function totalSupply() below or is there another reason?
Yes that is precisely why.
If totalSupply_ was named totalSupply it would clash with the function totalSupply() and you would get the following error message:
DeclarationError: Identifier already declared.
Required, but never shown