Hmm, fair enough. My main motivation for using 'this' is I mostly work with PHP, which has a huge library of global functions. So I'm used to having to identify class methods when calling them.
Next update, I'll work on removing 'this' from the method calls. I will keep them for variables though as I find a lot of value in being able to skim code and separate class properties from local variables.
As for the class variable placement, yeah, that was something I was experimenting with. You've got the "Principle of Proximity": keep related actions together (see Code Complete, 2ed, pg 351). That works a charm within routines, but I was trying to extend it to the class level: if a class variable is only used by one or two methods, group them all together.
I'm not sure it works though, so again, next update I'll try moving all the class variables to one place.
Cheers.
Recent Comments | Show All
2009/6/3
Othello
2009/6/3
RPG Sim