> It's not the first time this poor horse gets flogged
>
>   http://www.artima.com/forums/flat.jsp?forum=106&thread=36312

Yep. And it's a long discussion, and it doesn't end in complete agreement.

My position on it is that getters and setters, ugly as they are, and
due to lack of a nicer language construct, implement a wide understood
pattern. Whatever way you twist it, I believe directly accessing
private members does break encapsulation, though it doesn't ruin my
night rest.

As for public members not being future proof... well maybe, but a the
argument is bit far fetched :-) I wonder if by that time (we're
talking years) Java would still be my first choice for main stream
programming, as I'm getting increasingly tired of it's limitations.

Anyway, I think we agree in this thread that first the getters and
setters should be used, whether they are private or not, and as a
final resort the member directly. You agree with that?

Cheers,

Eelco

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to