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 ? >
It's true for your example! I don't know, but i think the most developers would use a 'final static'- constant for there keys, to avoid misspelling and to reduce the memory footprint. I my huble opinion the heavier constuction process (+ ~5sec) could save time because i don't have to test and/or debug, if set an attribute of the wrong type accidently. I think we need more opinions here, to see what the future users might think about the pro & contra.
