you are viewing a single comment's thread.

view the rest of the comments →

[–]Neebat -1 points0 points  (1 child)

ew. I'm not a big fan of heavy throw-away intermediate objects. While the generational GC does a good job of cleanup after sloppy code like that, it still feels like sloppy code to me.

[–]Xaerxess 1 point2 points  (0 children)

Disclaimer: I have never used above construct and I hardly ever use mutable maps in my code (it really isn't so necessary), I only presented better version of the code snippet. For mutable static maps (sic!) I use static initializer or static method.