IMHO we should try to keep the topic on "your take on generics", not on "your take on others take on generics". But while we're at it:

>I've read over 100 emails on this thread, and nearly all of the ones against keeping generics like they are currently implemented are from people who do not fully understand them

That *is* offending. How do you come to your conclusion that people don't understand generics? The following is not something I'd prefer, and I don't need to be a master in generics to form this opinion:

 DropDownChoice<Fruit> fruit = new DropDownChoice<Fruit>("fruit", new 
Model<Fruit>(), ...);
 new TextField<Integer> num = new TextField<Integer>("num", Integer.class)

you can't call "getModelObject()" and get the right type - so generics didn't 
help you within your component

IMHO generics should help in *using* components.

you can't tell the rest of us that we shouldn't have a generic component 
because it wouldn't be used 70% of the
time - that's only your use case

I doubt that, anyone using CompoundPropertyModel will easily reach that 
percentage.

It just seems wrong (to me) to generify Component just for one or two getters - 
weren't getters the root of all evil anyway? ;).

Back to the topic:

1) Generifying Wicket
 [X] Can best be done in a limited fashion, where we only generify
IModel but not components. I care more about what generifying can do
for API clarity (declaring a component to only accept certain models
for instance) than static type checking.

 [X] Whatever choice ultimately made, I'll happily convert/ start
using 1.4 and up ... what should I do otherwise, use JSF? (Just kidding)

Sven


Jeremy Thomerson schrieb:
My vote:
X - Can best be done like currently in the 1.4 branch, where models and
components are both generified
X - Whatever choice ultimately made, I'll happily convert/ start using 1.4
and up.

I have to modify that last sentence, though - because I will continue using
Wicket, because it's the best.  But I have already upgraded all of my
applications to use 1.4, and there wouldn't be any "happily" about it to
back it out and stop using generics for me.  They are too valuable to lose.
I have been using 1.4 with generics since before M1 was released, with
nearly half a dozen deployed production applications now running on either
1.4-M1 or M2.

Without intending to offend anyone, the rest of my thoughts on this:

I've read over 100 emails on this thread, and nearly all of the ones against
keeping generics like they are currently implemented are from people who do
not fully understand them and have not used them on a day-to-day basis.
I'll grant you that the first switch to 1.4 was a little intimidating, but I
had been wishing for generics in IModel since early 1.2 releases
(fortunately I never switched to 2.0).  Once you use them regularly, you
will grow to appreciate them.  I also agree that there are still some method
signatures that may be done better - we'll put those on the wiki as we come
across them.

Some are saying we don't need to "generify" component - but then you can't
call "getModelObject()" and get the right type - so generics didn't help you
within your component.  Where else will a generified model help you?  Where
are you using it that's not in a component?  Some say we should not generify
component, but they want getModelObject() to return the right type - they
don't understand generics.  There's a large discussion that says "I don't
use models in my components" - interesting, because nearly all of the
framework components use models - nearly all of my components use models - a
model is a pretty core part of a component - it's what stores the data that
the component is rendering or modifying - you can't tell the rest of us that
we shouldn't have a generic component because it wouldn't be used 70% of the
time - that's only your use case.

When we talk about new users being intimidated by Wicket because of
generics, it makes me think of the blog post by Martijn on Jonathan's
statement "don't hire wicket programmers" [1] - a good programmer with a
solid understanding of generics will not be intimidated when they start
using this framework.  This in no way implies that if you do not currently
like the generics that you are a bad programmer.  It only means that
generics are still new to some, they have not used them enough yet to be
really comfortable with them.  They are very valuable, but yes, java
could've implemented them better.  So, we'd all better get good with
generics - they've been in java for quite a while now, and they're here to
stay.  No reason Wicket shouldn't / can't do the same!

Jeremy Thomerson

1 - http://martijndashorst.com/blog/2008/03/30/dont-hire-wicket-programmers/

On Sun, Jun 1, 2008 at 3:44 PM, Eelco Hillenius <[EMAIL PROTECTED]>
wrote:

Hi all,

We have had several threads in this and the dev list, and some
discussions in the public on how to incorporate generics in Wicket.

I'd like to use this thread to gather the opinions of as many regular
Wicket users as we can. Please help us get an impression of what our
users think about the issue by completing this simple survey. Note
that it is not a vote; we only want to get an idea of what you think.

1) Generifying* Wicket
  [ ] Can best be done like currently in the 1.4 branch, where models
and components are both generified. I care most about the improved
static type checking generified models and components give Wicket.
  [ ] Can best be done in a limited fashion, where we only generify
IModel but not components. I care more about what generifying can do
for API clarity (declaring a component to only accept certain models
for instance) than static type checking.
  [ ] Should be avoided, I prefer the way 1.3 works. Because... (fill
in your opinion here).
  [ ] .... (anything other than these choices?)

2) How strongly do you feel about your choice above?
  [ ] Whatever choice ultimately made, I'll happily convert/ start
using 1.4 and up.
  [ ] I might rethink upgrading if my choice doesn't win.
  [ ] I definitively won't be using 1.4. if Wicket doesn't go for my
preference.

Thanks in advance for everyone participating, and pls feel free to
explain yourself further beyond just answering these questions!

Eelco

p.s. I suggest that the core devs and most active participants and
previous discussions wait a few days before giving their opinions so
that we don't flood the thread right from the start.

* Parameterizing would probably be the better word to use, but
generifying seems to be the word that many people use.

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





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

Reply via email to