On 12/5/11 3:52 PM, Christian Schwarz wrote:
What about mixing both mode ? A<String, Value> mode for simple usage, and
a typesafe mode, as you suggested (that means we will have two different
kind of map to store both elements).
I think two modes is one mode to much, it would confuse the user and the
typesafe aspect would be underminded by the<String, Value> mode.
As a user, having to create a new instance to hold the key and value
might be seen as heavy, don't you think ?
session.set(new AttributeKey<String>(String.class,"myKey"),"myAttribute");
is a bit more complex than
session.set( "myKey", "myAttribute" );
Or is it just me ?
(don't get me wrong, I understand the rational behind your proposal,
it's far superior than what I currently propose, but I'm not sure the
extra complexity worth it... Just my personal opinion, here).
thoughts ?
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com