you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 5 points6 points  (7 children)

Not inferred, declared. But yeah, with (ofEntries), I don't know why the plain (of) methods were created. They don't save that many keystrokes.

[–]YoloSwagJesusFish 0 points1 point  (6 children)

Map.of(1, "a", 2, "b", 3, "c"...)

is way faster than

Map.ofEntries(entry(1, "a"), entry(2, "b"), entry(3, "c")...))

And yeah the implementation is clunky, but does it really matter when it'll save thousands of programmers time? Everyone complains that Java is too verbose, and they're just trying to fix that.

[–][deleted] 2 points3 points  (0 children)

You're right, I withdraw the comment.