Raised This Month: $51 Target: $400
 12% 

View Poll Results: Which naming convention would you prefer?
1. zp_core_is_user_zombie( index ) 39 46.43%
2. zp_core_isUserZombie( index ) 5 5.95%
3. ZP_Core_IsUserZombie( index ) 1 1.19%
4. is_user_zombie( index ) 35 41.67%
5. IsUserZombie( index ) 4 4.76%
Voters: 84. You may not vote on this poll

ZP 5.0 API: Naming Conventions


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
MeRcyLeZZ
Veteran Member
Join Date: Dec 2007
Old 08-10-2011 , 23:06   ZP 5.0 API: Naming Conventions
#1

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]
__________________

Last edited by MeRcyLeZZ; 08-10-2011 at 23:29.
MeRcyLeZZ is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 08-10-2011 , 23:30   Re: ZP 5.0 API: Naming Conventions
#2

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.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
Tirant
Veteran Member
Join Date: Jul 2008
Location: Los Angeles, California
Old 08-11-2011 , 00:14   Re: ZP 5.0 API: Naming Conventions
#3

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.
__________________

PM me if you're interested in buying the Credits addition for Base Builder
Battlefield Rebirth [66% done]
Call of Duty: MW2 [100% done]
Base Builder [100% done]
Tirant is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 08-11-2011 , 01:29   Re: ZP 5.0 API: Naming Conventions
#4

Quote:
Originally Posted by Tirant View Post
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.
I use notepad++, and they don't have auto-complete for custom includes.

I think the only IDE's that use that are AMXX Studio and Pawn Studio, however, I may be wrong.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
Tirant
Veteran Member
Join Date: Jul 2008
Location: Los Angeles, California
Old 08-11-2011 , 02:18   Re: ZP 5.0 API: Naming Conventions
#5

Quote:
Originally Posted by nikhilgupta345 View Post
I use notepad++, and they don't have auto-complete for custom includes.

I think the only IDE's that use that are AMXX Studio and Pawn Studio, however, I may be wrong.
Notepad++ is an IDE... It also has autocomplete, but you have to implement it. I can't imagine how much of a pain in the butt it would be coding without auto complete.
__________________

PM me if you're interested in buying the Credits addition for Base Builder
Battlefield Rebirth [66% done]
Call of Duty: MW2 [100% done]
Base Builder [100% done]
Tirant is offline
yokomo
Surprise Ascot!
Join Date: May 2010
Location: Malaysia
Old 08-11-2011 , 02:19   Re: ZP 5.0 API: Naming Conventions
#6

is_user_zombie(index) is easy i for me, since it look short & universal.
__________________
Team-MMG CS1.6 Servers:
✅ MultiMod -- 103.179.44.152:27016
✅ Zombie Plague -- 103.179.44.152:27015
✅ Zombie Escape -- 103.179.44.152:27017
✅ Klassik Kombat -- 103.179.44.152:27018
✅ Boss-Battle -- 103.179.44.152:27019
yokomo is offline
9evill
Senior Member
Join Date: Apr 2007
Location: Lithuania
Old 08-11-2011 , 03:29   Re: ZP 5.0 API: Naming Conventions
#7

Leave it as is now, as in case of name chage all plugins will have to be rewrited.
9evill is offline
edgaras85
Senior Member
Join Date: Mar 2010
Location: Lithuania
Old 08-11-2011 , 04:11   Re: ZP 5.0 API: Naming Conventions
#8

Quote:
Originally Posted by 9evill View Post
Leave it as is now, as in case of name chage all plugins will have to be rewrited.
+1
__________________
edgaras85 is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 08-11-2011 , 04:25   Re: ZP 5.0 API: Naming Conventions
#9

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.
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
Accelerator
Senior Member
Join Date: Dec 2010
Location: Russia
Old 08-11-2011 , 04:57   Re: ZP 5.0 API: Naming Conventions
#10

Quote:
Originally Posted by 9evill View Post
Leave it as is now, as in case of name chage all plugins will have to be rewrited.
+1
Accelerator is offline
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:29.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode