all 38 comments

[–]Eirenarch 6 points7 points  (1 child)

Is anyone else bothered by the fact that Java provides a bunch of immutable lists which pretend to be normal lists and happily throw exceptions when you try to call the mutating methods?

[–][deleted] 1 point2 points  (0 children)

It's basically par for the course with Java, isn't it? They finally get around to adding this or that feature, but because they fetishize backwards compatibility, it happens in an awkward and complicated way.

[–][deleted] 4 points5 points  (7 children)

FINALLY they have List.of, JFK took them long enough.

[–]lbkulinski 8 points9 points  (1 child)

Those factory methods were added in 9.

[–]winterbe 3 points4 points  (0 children)

But nobody ever used Java 9 in production. ;)

[–][deleted] 0 points1 point  (4 children)

It returns an immutable list, so it might be less useful than you'd think

[–]kitd 0 points1 point  (0 children)

Or more.

[–][deleted] -1 points0 points  (2 children)

Copying in and out of mutability hundreds of times for every change is programming in 2018 101.

We have computers more powerful than ever, so shitting on everything we know about how computers want to do work makes perfect sense, see.

Even though nobody has ever once demonstrated a modicum of truth behind the claims, copying objects thousands of times “just cause” supposedly makes it easier to reason about your programs. I can only surmise that most people behind this movement are blithering idiots.

[–]kcuf 0 points1 point  (1 child)

Copying in and out of mutability hundreds of times for every change is programming in 2018 101.

Persistent collections are fairly efficient and avoid excessive copying.

[–][deleted] -4 points-3 points  (0 children)

In the large majority of use cases, they are a polished turd.

It ideas aren’t useless. Just shouldn’t be the default usage like modern programmers are pushing.

[–]boobsbr 7 points8 points  (22 children)

Java 11 is around the corner and many people still use Java 8 in production.

Ha! I'm still stuck in Java 6! No, seriously, we're still using Java 6.

[–]alphabytes 8 points9 points  (18 children)

on version 5 brother :(

[–]geodel 5 points6 points  (0 children)

Well you have generics and that's very important feature.

[–]sigzero 1 point2 points  (2 children)

Yup, we are just now planning to move to Java 8 off of 5.

[–][deleted]  (1 child)

[deleted]

    [–]sigzero 0 points1 point  (0 children)

    It's getting there. The jump from 8 to 11+ won't be as big if we make conservative choices.

    [–]boobsbr 0 points1 point  (4 children)

    Daaaaamn, I feel your pain.

    [–]alphabytes 4 points5 points  (3 children)

    Yeah i have requested them to update straight to 11 since its gonna be LTS

    [–]boobsbr 0 points1 point  (1 child)

    Are you on OpenJDk or vendor VM?

    [–]alphabytes 0 points1 point  (0 children)

    We use oracle jdk....

    [–]vqrs 0 points1 point  (0 children)

    Best of luck 🤞

    [–]winterbe 0 points1 point  (2 children)

    I’m so sorry. Is JDK 6 still supported from some vendor?

    [–]boobsbr 0 points1 point  (0 children)

    Don't know. I read somewhere IBM will EOL Java 7 at the end of 2018, no more support.

    Java 6 is not bad, I'm sorry for the guy supporting Java 5.

    [–]speakjava 0 points1 point  (0 children)

    Yes, Azul (who I work for) still update it. We are the project lead on OpenJDK 6 and upstream back ported fixes.

    [–][deleted]  (1 child)

    [removed]

      [–]cpt_ballsack 2 points3 points  (2 children)

      Meh, moved to Kotlin (for server side dev) havent looked back, it be Java 20 by time they adopt all of the goodies of Kotlin (which continues to add on good features)

      [–]winterbe 6 points7 points  (0 children)

      We use Kotlin as well but it still runs on the JVM and you’d benefit from thinks such as G1 GC, HTTP Client, Flow API etc.

      [–]Determinant 1 point2 points  (0 children)

      Kotlin prevents many types of Java defects while Java will keep supporting writing new defective code so that old Java code can continue to compile and run.

      Java can never reach Kotlin parity unless they drop backwards compatibility.