On Mon, Jun 16, 2008 at 3:48 PM, Matthijs Wensveen <[EMAIL PROTECTED]> wrote:
> A little off-topic: It scares me a little when core developer make bold
> statements like: "setters are evil" and "I wouldn't mind final was the
> default in java". Maybe I'm just being paranoid here...

Why? Are we not allowed an opinion? And from an OO point of view, I
can see how setters break encapsulation: they expose the internal
state of an object. In the case of setVisible this is exacerbated
because the semantics of the following are vague:

Label l = new Label("l", "foo") {
    @Override boolean isVisible() { return false; }
};
l.setVisible(true);
add(l);

So either you'd want final to be the default, or you'd consider
setters evil. :-D

Martijn

-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.3

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

Reply via email to