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

Dynamic Arrays in SourcePawn


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Steell
SourceMod Donor
Join Date: Mar 2009
Old 08-08-2012 , 14:14   Re: Dynamic Arrays in SourcePawn
Reply With Quote #31

Quote:
Originally Posted by BAILOPAN View Post
Note that arrays will always be passed by reference to functions no matter what, so you don't have to worry about that.
Right, but if we're using @ to denote array references when declaring new variables, then I feel that everywhere we're dealing with references we should also use @ to remain consistent; even though there's no functional point in including @ in function parameters, for example, new Sourcepawn 2 users will see function headers without @ for arrays and assume that they're passed by-value, since declaring new arrays without the @ means precisely that.

For proposal 4, if we include @ in function parameters for arrays, then although it's consistent and easier to read, it's extra work for the user writing the code. Since it's always pass-by-reference then we could always omit the @ in function parameters for arrays, but then it's syntactically inconsistent with array references everywhere else.

In summary: minor nitpicking about syntax.
__________________
Steell is offline
 



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 06:37.


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