View Single Post
  #10  
Old 12-16-2011, 07:21 PM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
Quote:
Originally Posted by Crow View Post
Let's start off with the temp prefix Chris was talking about. I mostly agree with always using it, but I sometimes don't do it in generally long lines/function calls because I believe it destroys readability.

What are your thoughts on this?
As long as functions cannot be closed over, I would always use the temp prefix because it clearly defines the lookup chain.

This is especially true of code that uses a with block or GUI controls just because a lot of people like to drop the this prefix in those cases, so it actually becomes something of a burden for the reader.

However, removing the temp prefix has no ramifications as far as efficiency is concerned (save for 5 keystrokes).

e:

Quote:
Originally Posted by ffcmike View Post
On a similar note I compared script time between the use of the this. or player. prefix in classes joined to the player, if my results were accurate then it was always faster using this. as opposed to player. with variables and functions Serverside, however Clientside only with variables was the use of the this. prefix faster. And yes the difference was tiny.
Could you post the code you used to test? This really seems unbelievable to me.
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/
Reply With Quote