Forum Post: RE: TT in method

  • Thread starter Thread starter Thomas Mercer-Hursh
  • Start date Start date
Status
Not open for further replies.
T

Thomas Mercer-Hursh

Guest
@ske, I don't see it that way at all. To me, the TT is no different than a variable I define in a method because that is its appropriate scope. Conceptually, that is what one would expect to do and it appears that it is an AVM limitation that keeps one from doing so. This whole business of moving it out into another class is adding a layer of complexity that has no value other than to guarantee the limitation of scope. The work around is to remember to empty the table each time. The issue of exposing internal implementation is not one of trying to hide the implementation from the method, since if things worked as they wish they did, the TT would be right there in the method, but rather than it is bad OO practice for any object to expose its internal implementation ... which your proposal would do by design. Pedro's design is a good one in general since he is doing exactly what I advocate with TTs, particularly those which need to be shared between objects. Passing a TT as a parameter, one is exposing implementation. Passing an object which contains a TT one is not. I just think it is the wrong solution here because the TT isn't being passed anywhere, it is local to the method of this one class.

Continue reading...
 
Status
Not open for further replies.
Back
Top