News for hackers. Stuff that matters.
Re:JDK 20 and JDK 21: What We Know So Far by kaba0 on Friday March 10, 2023 @03:26AM (#35091937)
Why don’t just write var list = new ArrayList<Foo>()? The point of inference inside <> has always been to save you from repeating yourself from copying from the left to the right, which is a non-issue when you are saved from specifying it on the left.
Re:JDK 20 and JDK 21: What We Know So Far by VagueMag on Friday March 10, 2023 @04:54PM (#35101678)
Completely agree, but it did surprise me a bit and I didn't find much when I googled around for "don't mix var and the diamond operator."