ZP 5.0 API: Naming Conventions
So real quick, which naming convention would you prefer for the upcoming ZP version and why?
We think it's probably best to have consistency across all modules. The generic naming scheme that we have come up with so far is: Natives: zp_[module]_[function] Forwards: zp_fw_[module]_[forward] |
Re: ZP 5.0 API: Naming Conventions
Definitely the first one. Easier to distinguish which functions are directly related to zombie plague, and then the coders don't have to worry about case (can just type all lower-case).
I think it's just easier that way. |
Re: ZP 5.0 API: Naming Conventions
Okay, I will explain why the naming conventions are the way they are. With this new version, the entire mod is now completely modularized and not just one gigantic thing. So we wanted to have it be easy to find certain functions and also know where they belong.
The reason why I vote for method 2 is because it's spaced out where it needs to be and reduces the underscores. For something above, it's not so bad, but for other functions with longer natives, then it might become too long and not work. I think it also looks better also. Also, it doesn't matter for case because it will autocomplete most of the time. I myself can't even remember typing out an entire native without it auto-completing it. I just think, everything should have a purpose and be as organized as possible to make it as easy as possible to find natives. |
Re: ZP 5.0 API: Naming Conventions
Quote:
I think the only IDE's that use that are AMXX Studio and Pawn Studio, however, I may be wrong. |
Re: ZP 5.0 API: Naming Conventions
Quote:
|
Re: ZP 5.0 API: Naming Conventions
is_user_zombie(index) is easy i for me, since it look short & universal.
|
Re: ZP 5.0 API: Naming Conventions
Leave it as is now, as in case of name chage all plugins will have to be rewrited.
|
Re: ZP 5.0 API: Naming Conventions
Quote:
|
Re: ZP 5.0 API: Naming Conventions
I totally agree with yokomo, because is_user_zombie sounds really much more easier. :)
P.S God damn it, I voted for IsUserZombie( client ); .Although this also isn't bad idea. :) |
Re: ZP 5.0 API: Naming Conventions
Quote:
|
| All times are GMT -4. The time now is 09:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.