On Jul 18, 2007, at 14:28, Peter B. West wrote:

Hi Peter

alt-design always cached _all_ the Integer instances it needed. Another
startling new idea.

FWIW, I did not presume my idea to be startling or new. Just was a bit bugged by the number of places in the current trunk where Integers are used, solely for the purpose of being able to store ints in a Map...

Personally, I would not even cache Integer instances, but deal only with the primitives unless there was a really /compelling/ reason not to do so, not merely because 'It's cool to use Objects'. Following that latter motto, I'd as soon compile a new object type that is dedicated to storing primitive int-to-int mappings and avoid the construction of Integers altogether.

Oh well, in the end more a question of personal taste, I guess.



Reply via email to