On Friday 04 April 2008 13:47:40 John M. Dlugosz wrote: > But, it is also stated that in derived and trusted classes, and even in > the class itself, $.a is an accessor call? As opposed to $!a which is > the direct access to the attribute. Is this accessor different from the > function form used outside the class?
It shouldn't be. > Why keep the variable syntax? Uniform access principle. See also "Why Java programmers fetishize their IDEs, reason #482: autogeneration of metric boat-loads of accessors/mutators at just the click of a button." > I'm getting a picture of 3 forms of access: Really direct, direct but > asking the class to access it rather than knowing how storage works, and > indirect that may involve your own code to do other things besides just > get/set the attribute. But I think the middle one can be handled > invisibly by the compiler -- it's no different from a tied hash. That really depends on how much external syntax you want to change if you change the internal representation of an object. For me, that's approximately none. -- c