View Single Post
01-18-13, 05:53 AM   #5
Aanson
A Flamescale Wyrmkin
Join Date: Aug 2009
Posts: 124
Re the 10/20/50 look-ups in a func, I merely said that in the interests of creating a fictional scenario to express my point and, in turn, better ask my question. I assure you that I'n not ...
Originally Posted by Phanx View Post
doing something horribly wrong.
I'm disappointed that I mustn't have worded the question clearly enough to make that point obvious.

Originally Posted by Phanx View Post
I'd really suggest avoiding cryptic variable names like cW outside of macros. Space is unlimited in addon code. Use names that (a) will immediately make sense to you if you don't look at the code for 6 months, and (b) will immediately make sense to other pgorammers looking at your code for the first time. There's just no reason to use something like cW -- where you have to try to figure it out from context, eg. seeing cW:AddMessage(...), or go find where it's defined -- instead of a descriptive name like chatWindow.
With regards to the cryptic name cW; it's one frame of two within a small module called 'Chat'.

Lua Code:
  1. local cB = f.chatButton;
  2. local cW = f.chatWindow;

Trust me, if you were to see it in context, I'm sure you'd be hard pressed at getting confused.

I'll keep it like that as it makes a world of sense to me, but thank's for your advice. Each to their own, I suppose.

Thanks, but for me, this question was already answered.


Aanson.
__________________
__________________
  Reply With Quote