that's an interesting OO discussion... :-)
I would only use protected variables as long they are "final" to reduce
the boring "getXY()" code. But "final" is not possible in our case as
the variable's value is injected and not set via a constructor call.
Therefore Thiago is right to my personal opinion as it may break
encapulation if derived classes can easily modify it without controll by
the class owning that particular member. Is this off-topic?
Jens
Am 21.10.11 18:41, schrieb Thiago H. de Paula Figueiredo:
On Fri, 21 Oct 2011 12:48:40 -0200, hese <1024h...@gmail.com> wrote:
I understand encapsulation and the need for it, but isn't it very
common for base classes to have protected variables which the derived
classes can
access freely without having accessor methods?
Not in good object-oriented code IMHO. ;)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org