Thread: Better ATTR's
View Single Post
  #20  
Old 07-28-2011, 03:52 AM
Hezzy002 Hezzy002 is offline
Registered User
Join Date: Jul 2011
Posts: 247
Hezzy002 is a jewel in the roughHezzy002 is a jewel in the rough
Quote:
Originally Posted by fowlplay4 View Post
The consequences of using the system seem to far outweigh the benefits of being able to use a variable directly.

You can easily hide the "ugly" code related to the player attr with a class, and write common accessors and mutator functions.

pl.getNicknameColor() is just as self-documenting than pl.nicknameColor.
There are no "consequences", though.. The server is experiencing no more strain than if you were to use attrs, they're handled in exactly the same way, just natively in <insert language Graal's servers are written in> instead of GS2, and considering that it hardly uses any CPU resources, it would be bound at most by the lookup speed of the server's drives and so would attrs..

Other than that, the syntax is better than attr's, it requires less work to get it to be self-documenting, it's easier for the scripter, it doesn't require casting to a string to work correctly with things like arrays, there's no 223 character limit, and you can use more than 30 should you desire to. I don't see any of the consequences you're talking about, period.

I mean, I could be wrong, what consequences are you talking about?

Last edited by Hezzy002; 07-28-2011 at 04:04 AM..
Reply With Quote