On 1/15/07, Johan Compagner <[EMAIL PROTECTED]> wrote:
That param is just so that we can really check it at runtime time.
But if we think we really don't need it.
Jonathan and I were in the same room when he coded this up, and we
talked about how we needed such a construct because we couldn
That param is just so that we can really check it at runtime time.
But if we think we really don't need it.
Generics is just perfect for MetaData because you exactly what you get
back..
What that metadata represents.. (not just about the cast itself)
Type erasure thats the big problem here :
MetaDataKey was setup with the parameter because we couldn't use
generics for Wicket 1.x. But well...
So, you and Igor want to keep the generics on top of the parameter,
just so that you don't have to cast when you get a value? It's not
even more efficient code-wise, and you won't gain any extra
We don't now have any runtime checks. So with a bit of casting and
"forgetting" generics you can
now store in a metadata key something that isn't meant for this key..
So keeping both is my preference if we keep one then the parameterization
because that
is a bit cleaner when using the metadata's
Both? You must be kidding. -1 for that. You'll get my +1 for either
the class argument or the parameterization.
Eelco
On 1/14/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
yeah it looks stupid, but the protection is there for a reason. and you only
do it once - where you declare the key. so i
yeah it looks stupid, but the protection is there for a reason. and you only
do it once - where you declare the key. so i am +1 for keeping both
-igor
On 1/14/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
I don't think the safety net mattered that much, and furthermore,
prior to the change,
I don't think the safety net mattered that much, and furthermore,
prior to the change, you have to make constructs like:
new MetaDataKey(ActionPermissions.class) {
};
which imo is just stupid and actually surprised me no-one caught that.
So, if you are worried about the runtime check, we should
not sure about this commit [1] by eelco.
yes we have the generics, but that safety was enforced at runtime, not
compile time. do we really want to lose that safety net?
[1]
http://mail-archives.apache.org/mod_mbox/incubator-wicket-commits/200701.mbox/ajax/[EMAIL
PROTECTED]
-igor