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

Arrays with N Dimensions


Post New Thread Reply   
 
Thread Tools Display Modes
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-22-2010 , 13:20   Re: Arrays with N Dimensions
Reply With Quote #11

Quote:
Originally Posted by SnoW View Post
Second that, a plugin will compile easily without amxmodx included.
I suppose only idiots do that
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 01-22-2010 , 13:45   Re: Arrays with N Dimensions
Reply With Quote #12

Quote:
Originally Posted by ConnorMcLeod View Post
I suppose only idiots do that
Not really. For my opinion there's no point including a bigger entirety if you only use a part of it. Not depending if it's included anyway. For example in this case Emp should include only cellarray.
SnoW is offline
Send a message via MSN to SnoW
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 01-22-2010 , 14:31   Re: Arrays with N Dimensions
Reply With Quote #13

Quote:
Originally Posted by SnoW View Post
Not really. For my opinion there's no point including a bigger entirety if you only use a part of it. Not depending if it's included anyway. For example in this case Emp should include only cellarray.
Thought I had it in there, guess I removed it accidentally when I was cleaning it up.

edit: Fixed.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
01101101
BANNED
Join Date: Nov 2009
Location: 9`su 09`n0n7e`r0f76a
Old 01-22-2010 , 14:37   Re: Arrays with N Dimensions
Reply With Quote #14

Quote:
Originally Posted by SnoW View Post
Not really. For my opinion there's no point including a bigger entirety if you only use a part of it. Not depending if it's included anyway. For example in this case Emp should include only cellarray.
Adding an include and not using it doesn't change at all.
01101101 is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 01-22-2010 , 14:41   Re: Arrays with N Dimensions
Reply With Quote #15

Quote:
Originally Posted by 01101101 View Post
Adding an include and not using it doesn't change at all.
Didn't quite understand what are you referring to. If you mean that including something and then not using anything from the include has no consequences, you are wrong. The global memory reserved and functions created aren't depending the usage. With defines and stocks this is obviously different.

In this issue amxmodx is included anyway in anything decent doing plugin. Somehow it doesn't change the fact that it wouldn't be better to include only what you need.
SnoW is offline
Send a message via MSN to SnoW
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-22-2010 , 21:39   Re: Arrays with N Dimensions
Reply With Quote #16

So, if we go in your way, it would be even better to declare only needed natives and forwards at the top of a code ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 01-23-2010 , 05:26   Re: Arrays with N Dimensions
Reply With Quote #17

Quote:
Originally Posted by ConnorMcLeod View Post
So, if we go in your way, it would be even better to declare only needed natives and forwards at the top of a code ?
Obviously not. In this case when the amount of text you write is the same, it does seem clear to me which one is more advantageous option. Somehow I'd never prefer anything similiar to that. Not only the work matters when that would take the readability and modifibility of the code to the lowest level.

Last edited by SnoW; 01-23-2010 at 05:31.
SnoW is offline
Send a message via MSN to SnoW
01101101
BANNED
Join Date: Nov 2009
Location: 9`su 09`n0n7e`r0f76a
Old 01-23-2010 , 09:07   Re: Arrays with N Dimensions
Reply With Quote #18

Quote:
Originally Posted by SnoW View Post
Didn't quite understand what are you referring to. If you mean that including something and then not using anything from the include has no consequences, you are wrong. The global memory reserved and functions created aren't depending the usage. With defines and stocks this is obviously different.

In this issue amxmodx is included anyway in anything decent doing plugin. Somehow it doesn't change the fact that it wouldn't be better to include only what you need.
If you write

stock fuck()
{
//random shit
}

And you never call it, it won't be even compiled.

Any non-retarded include will have just natives, stocks and defines, which aren't compiled if not called.
01101101 is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 01-23-2010 , 11:33   Re: Arrays with N Dimensions
Reply With Quote #19

Quote:
Originally Posted by 01101101 View Post
If you write

stock fuck()
{
//random shit
}

And you never call it, it won't be even compiled.

Any non-retarded include will have just natives, stocks and defines, which aren't compiled if not called.
I'm very aware of how the parser works. You don't need to provide rude examples about a thing I've already noted as I said stocks and defines are different.

You are now arguing about a thing that doesn't even matter. Even including amxmodx didn't reserve any memory or wouldn't effect the plugin anyway, it's still better to include only the part of the core you need.
SnoW is offline
Send a message via MSN to SnoW
01101101
BANNED
Join Date: Nov 2009
Location: 9`su 09`n0n7e`r0f76a
Old 01-23-2010 , 11:55   Re: Arrays with N Dimensions
Reply With Quote #20

Quote:
Originally Posted by SnoW View Post
I'm very aware of how the parser works. You don't need to provide rude examples about a thing I've already noted as I said stocks and defines are different.

You are now arguing about a thing that doesn't even matter. Even including amxmodx didn't reserve any memory or wouldn't effect the plugin anyway, it's still better to include only the part of the core you need.
Oh lol examples weren't intended to be rude, just random names.

You are saying you already noticed how it works, but at the same time you say it is still better to include part of the core. Why? The only difference I see is that AMXX STUDIO or whatever you use will take shorter in function shortcutting.

The only difference I found from including something and not, is this

#pragma reqlib
#pragma library
#pragma loadlib

Which will add a really few bytes to the header.

So, I ask you, which is the benefit obtained from including just what you need?

[sarcasm]Oh, and by the way, if you are running amxmodx on a 64kb memory machine and you want to save those bytes you can remove that from all module includes, since the only thing it does is autoenabling modules.[/sarcasm]

And by the way, even if you used just 1 function from fakemeta you should keep that stuff for autoloading modules.
01101101 is offline
Reply


Thread Tools
Display Modes

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 08:30.


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