On Wed, May 21, 2008 at 2:44 PM, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:
>> Generified component touches *ALL* code in Wicket, wether you care or
>> not. IModel<T> itself is rather contained.
> Yes, but in my opinion rather useless as well. Plus you get heaps of
> @SuppressWarnings all over the place. Then just get rid of generics
> completely...

It is not useless. It *documents* the API in a self describing manner,
without getting out of control, or without having to read fricking
LISP code.

The suppress warnings can be turned off by telling your compiler not to warn.

And why would you need suppress warnings? Not for this:

Link link = new Link("link", personmodel) {
    onclick() {
        Person p = (Person)getModelObject();
    }
};

Not one warning in sight when you use this code. DDC is the same:
barely you need to work directly with its model object, because you
bind it to another object. I have little or no code that does
ddc.getModelObject(); and even then, one cast is enough, and will get
rid of about 100 gazillion repeats of the type parameters.

Typesafety through obscurity is not a direction I want Wicket to go.
It is already hard enough to learn Wicket's basics. With Component<T>
it gets too difficult.

Martijn

-- 
Buy Wicket in Action: http://manning.com/dashorst
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