09.10.2015, 21:04
Hello
I want to know a "pro" coding style (convention?) since I am rewriting my entire gamemode, fixing things and optimizing my code.
I was been using the Allman identiation style and an "ugly" name for the variables, so I decided to change every name of the variables, using this time the "Hungarian notation" (Am I right?), because it seems to be clearer and easier to understand and with Notepad++ easier to find the variable names.
My old style:
New style I want to use
Where gTCSince means GetTickCount() since the last shot.
I think it is a good idea using capital letter for constants but I am really confused since I started to learn Java, where the classes starts with a uppercase letter, and unlike pawn and my coding style, the methods always start with a lower case letter(except the constructor method)
Can you recommend me a very good coding style for PAWN?
I have read this https://en.wikipedia.org/wiki/Hungar...#Disadvantages and some SA-MP members don't like this convention, why?
PD: I definitely won't change my Allman identiation style.
I want to know a "pro" coding style (convention?) since I am rewriting my entire gamemode, fixing things and optimizing my code.
I was been using the Allman identiation style and an "ugly" name for the variables, so I decided to change every name of the variables, using this time the "Hungarian notation" (Am I right?), because it seems to be clearer and easier to understand and with Notepad++ easier to find the variable names.
My old style:
PHP код:
new Last_Shot[MAX_PLAYERS];
PHP код:
gTCSinceLastShot[MAX_PLAYERS];
I think it is a good idea using capital letter for constants but I am really confused since I started to learn Java, where the classes starts with a uppercase letter, and unlike pawn and my coding style, the methods always start with a lower case letter(except the constructor method)
Can you recommend me a very good coding style for PAWN?
I have read this https://en.wikipedia.org/wiki/Hungar...#Disadvantages and some SA-MP members don't like this convention, why?
PD: I definitely won't change my Allman identiation style.