wyrd
Well-known member
Ive been looking to perhaps change my style in programming just a tad. However, I cant remember which language an underscore at the beginning of a variable was considered bad (ie; _somevar). Was it C++, Java or .NET? I cant remember.
In any case, Ive been thinking about using _somevar rather then say, somevar (which I usually use, heh). So, my code would look something like this..
I know back in the days (heh, wasnt that long ago I suppose), it was something like m_somevar, however being anal as I am, I hate the extra typing (yeah, I know, its just one char for crying out loud), and not to mention I just hate the way the m_ looks, and in my opinion just a single _ sticks out more.
Anyway.. suggestions, thoughts, inputs? And if anyone knows which language the _ is considered bad in please tell me, its going to bother me until I remember, heh.
In any case, Ive been thinking about using _somevar rather then say, somevar (which I usually use, heh). So, my code would look something like this..
C#:
public class Hi {
private string _s;
private int _i;
public Hi(string s, int i) {
_s = s;
_i = i;
}
}
I know back in the days (heh, wasnt that long ago I suppose), it was something like m_somevar, however being anal as I am, I hate the extra typing (yeah, I know, its just one char for crying out loud), and not to mention I just hate the way the m_ looks, and in my opinion just a single _ sticks out more.
Anyway.. suggestions, thoughts, inputs? And if anyone knows which language the _ is considered bad in please tell me, its going to bother me until I remember, heh.