> Brennan Young wrote:
>
> Glad you brought this up again, Colin.

I'm sure others are not so happy;)

>
> > 1) It's more difficult to program (but so was switching to OOP
> for me a few
> > years back and now I never program without it).
>
> Perhaps, yes. I've found it easier than I expected to take this
> approach to
> the centre of my practice. There are certainly some hairy moments, but the
> discipline is delicious when you really have a completely opaque
> implementation working.

I concur completely, there was always something that nagged me the wrong way
when I used "getter" methods in the past and now I feel that by forcing
myself to not use them has made my objects better, stronger, faster (ok, not
necessarily faster but I could not resist the 6 million dollar man
reference)

Something I forgot to mention in my original post -- I do anticipate that
programming with this technique will eventually get easier for me.

>
> > 2) It seems to increase the size (lines of codes) of my objects.
>
> I found this too, but then I also found that I could break down
> the objects
> further than I had expected, and in ways I hadn't considered at first.
> Because they were well-encapsulated to start with, I could do this without
> fear of 'breaking' something else.
>

I agree. I knew that somehow, with time and effort I could break my larger
object back down to the smaller objects that I use to enjoy so much. But
deadlines have prevented me from doing this. Fortunately, I am currently
working on an ongoing project, that with each client, I get to refine as I
go along. I will get the chance to see if I can further refine my objects
while still attempting to avoid getter methods. I'm actually enjoying the
challenge.


>
> For me, it's been useful to think about how my active objects can provide
> 'services' to other objects, rather than acting as mere data wrappers or
> gatekeepers. The encapsulation should never be in question. If I start
> asking 'should the object let others see this property<by using a getter
method>?' then I know I
> didn't encapsulate properly.

Bingo! This is exactly the same the same litmus test I use as well.

> and
> it all comes
> down to knowing *why* the 'foreign' object needs that private data. If you
> know what it's going to be used for, there's no longer any need
> for a get function.

Canasta (sp??? Just didn't want to say bingo again)

>
> It would be interesting to hear what else you discover.

If any further enlightenments come my way I will let you know.

> and what
> others think.

It appears that Al has started an interesting thread on the topic.

ck



[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to