What is the general meaning and where did it start to have variables with leading or trailing underscores?
I have always thought a leading underscore indicated the variable was a pointer but I don’t know where I got this idea. Recently I have seen these naming conventions used in Java which makes that reasoning completely wrong.
It depends a bit on the programming language.
In C/C++ the _varname microsoft used it for naming internal compiler variables to distinguish them from user variables. Lately though I have started to see both prefix _ and postfix _ as a way to denote instance variables in various languages.