E
elsi11
Guest
Hey guys!
I came to a point where I decided it would be cool to just pick some rules on how to write my variable names. Sometimes I separate words with underscores, but then end up using a capital letter for X or Y. I never liked capital letters and camel cases because the readability is meh, and shift is further away than an underscore. At one point, I decided to put a prefix on my local variables because I use a whole bunch of them all the time because I think I'm cool when I make a script, and you just fill it up with some info. And just today, I realized that an underscore as a prefix is nice looking, until you use it in a script, and it doesn't play nice with commas.
Also, I sometimes used reserved names like direction or dir, and object variable names like state for my enums, and I was told that was super bad (even though everything worked).
So I dunno. Is there some kind of special naming convention you guys use? I read the wiki about conventions and it said this joke:
What do you use? What should I use?
I came to a point where I decided it would be cool to just pick some rules on how to write my variable names. Sometimes I separate words with underscores, but then end up using a capital letter for X or Y. I never liked capital letters and camel cases because the readability is meh, and shift is further away than an underscore. At one point, I decided to put a prefix on my local variables because I use a whole bunch of them all the time because I think I'm cool when I make a script, and you just fill it up with some info. And just today, I realized that an underscore as a prefix is nice looking, until you use it in a script, and it doesn't play nice with commas.
Also, I sometimes used reserved names like direction or dir, and object variable names like state for my enums, and I was told that was super bad (even though everything worked).
So I dunno. Is there some kind of special naming convention you guys use? I read the wiki about conventions and it said this joke:
So, yea, didn't learn much from that.Variable names should not start with underscore (_) or dollar sign ($) characters, even though both are allowed. This is in contrast to other coding conventions that state that underscores should be used to prefix all instance variables.
What do you use? What should I use?