Coding style
#1

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:
PHP код:
new Last_Shot[MAX_PLAYERS]; 
New style I want to use
PHP код:
gTCSinceLastShot[MAX_PLAYERS]; 
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.
Reply


Messages In This Thread
Coding style - by Su37Erich - 09.10.2015, 21:04
Re: Coding style - by MP2 - 10.10.2015, 11:19
Re: Coding style - by Vince - 10.10.2015, 12:10
Re: Coding style - by Su37Erich - 24.10.2015, 00:52
Re: Coding style - by Kaperstone - 24.10.2015, 03:43
Re: Coding style - by Crayder - 24.10.2015, 08:45

Forum Jump:


Users browsing this thread: 1 Guest(s)