AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   ZP 5.0 API: Naming Conventions (https://forums.alliedmods.net/showthread.php?t=164392)

MeRcyLeZZ 08-10-2011 23:06

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]

nikhilgupta345 08-10-2011 23:30

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.

Tirant 08-11-2011 00:14

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.

nikhilgupta345 08-11-2011 01:29

Re: ZP 5.0 API: Naming Conventions
 
Quote:

Originally Posted by Tirant (Post 1530045)
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.

Tirant 08-11-2011 02:18

Re: ZP 5.0 API: Naming Conventions
 
Quote:

Originally Posted by nikhilgupta345 (Post 1530062)
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.

yokomo 08-11-2011 02:19

Re: ZP 5.0 API: Naming Conventions
 
is_user_zombie(index) is easy i for me, since it look short & universal.

9evill 08-11-2011 03:29

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.

edgaras85 08-11-2011 04:11

Re: ZP 5.0 API: Naming Conventions
 
Quote:

Originally Posted by 9evill (Post 1530106)
Leave it as is now, as in case of name chage all plugins will have to be rewrited.

+1

NiHiLaNTh 08-11-2011 04:25

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. :)

Accelerator 08-11-2011 04:57

Re: ZP 5.0 API: Naming Conventions
 
Quote:

Originally Posted by 9evill (Post 1530106)
Leave it as is now, as in case of name chage all plugins will have to be rewrited.

+1


All times are GMT -4. The time now is 09:12.

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