Quote:
Originally Posted by Crow
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
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.