09.07.2012, 21:28
Why do people use Hungarian notation in Pawn? I can't help but shiver every time I see it.
Seeing as pawn only has one type of integer variable and all strings are zero-terminated, it makes even less sense using it. Then there is the redundancy: szString or iIndex are the most prominent examples that come to mind. Well you don't say! Of course I know that "string" is a string and that "index" is an integer, I don't need prefixes to tell me that! Needless to say, I do use SOME prefixes (like g for global variables) but nothing over the top. I certainly don't need this stuff in my function headers where the type of every variable can be deducted at a glance.
Then there is the issue of people copying scripts using this notation, with no clue whatsoever as to what it means. Hell, I've even seen people putting 'sz' in front of everything.
Seeing as pawn only has one type of integer variable and all strings are zero-terminated, it makes even less sense using it. Then there is the redundancy: szString or iIndex are the most prominent examples that come to mind. Well you don't say! Of course I know that "string" is a string and that "index" is an integer, I don't need prefixes to tell me that! Needless to say, I do use SOME prefixes (like g for global variables) but nothing over the top. I certainly don't need this stuff in my function headers where the type of every variable can be deducted at a glance.
Then there is the issue of people copying scripts using this notation, with no clue whatsoever as to what it means. Hell, I've even seen people putting 'sz' in front of everything.