← Back to team overview

ooc-dev team mailing list archive

j/ooc doesn't allow unqualified member access.


In j/ooc you can't access static members without prepending "This ".
I don't think this should be enforced, but rather simply mentioned in the 
style guide ORC (which still needs to be written, btw). It especially doesn't 
make sense with constants, eg. in oos, functions inside Display class have to 
use "This VIDEO_MEMORY" instead of just "VIDEO_MEMORY". According to the erorr 
message given when you don't use "This", this was done for 'clean code', but 
in my opinion it is sometimes cleaner without "This" and the option should be 
left to the user.

See http://github.com/tsion/oos/blob/covers-and-

I don't believe it would make it any cleaner to pepper that code with "This". 
In fact quite the opposite.

In j/ooc, all you have to do is remove 3 lines of code that call that 
exception and it all works fine. I don't know what must be done in rock, but it 
should also be able to do unqualified member access.

if anyone else has any thoughts or arguments, I'd like to hear them.

- Scott Olson

Follow ups