effective-java-3e-source-code icon indicating copy to clipboard operation
effective-java-3e-source-code copied to clipboard

confusing language about "EnumMap version" in Item 37

Open xdavidliu opened this issue 1 year ago • 0 comments

in item 37 on page 173, the second paragraph talks about "an EnumMap version and two stream-based versions". This is confusing and misleading because the second of the two "stream versions" also happens to use EnumMap, i.e. it's a combination of EnumMap and stream. What the book calls "the EnumMap version" probably refers to the one on 172, which uses only EnumMap and not stream.

Hence, instead of "EnumMap version", the book should probably say "non-stream EnumMap version". You could argue that juxtaposing "EnumMap version" next to "stream-based" automatically implies that the former is non-stream, but I feel like that's still somewhat misleading and made me do a distracted double-take.

xdavidliu avatar Jul 03 '23 22:07 xdavidliu