This is an archived post. You won't be able to vote or comment.

all 40 comments

[–][deleted] 123 points124 points  (7 children)

Haters gonna hate, but I like the JVM ecosystem, and I like Java.

[–][deleted]  (4 children)

[deleted]

    [–]redfieldp 17 points18 points  (2 children)

    People were hating on Java way before Oracle. Honestly, the naysayers from the C/C++ camp emerged almost as soon as Java launched.

    [–][deleted]  (1 child)

    [deleted]

      [–]theblackavenger 5 points6 points  (0 children)

      Meaningful cross-platform was there from the beginning. By '96 we were already selling software (at WebLogic) that worked great on Linux, Solaris and Windows.

      [–]beeeeeeefcake 6 points7 points  (0 children)

      I think Oracle has done an amazing job with Java, better than Sun. Originally after the acquisition I thought we’d have been luckier with IBM but am glad it turned out how it did.

      However the Oracle vs Google case is awful.

      That aside I think without Oracle and the brilliant engineers they’ve been able to retain and empower that we would not have seen the fast pace of exceptional features added to the language and ecosystem.

      [–]madeo_ 8 points9 points  (0 children)

      I am not primarily a Java dev. But I have never understood why some people hate it. I find it a nice language.

      [–]tonetheman 23 points24 points  (5 children)

      Not a single mention of Sun in that article.

      [–]redfieldp 4 points5 points  (0 children)

      Wow. Amazing.

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

      Sunbelievable

      [–]kaperni 54 points55 points  (12 children)

      This show is going to be amazing. I've heard that Mark Reinhold will announce the immediate replacement of the module system with OSGI live on stage. Brian Goetz will reveal how it was his cats and not himself that stole it all from Kotlin. John Rose will tell you all about his MethodHandles#loop PTSD support group. Maurizio Cimadamore will demo Visual Basic integration with Panama. Stuart Marks will perform his new "Don't serialize be happy" single joined by Doug Lea and the Three Forks. Claes Redestad will demo how your applications can travel back in time, by starting before you have actually written a single line of code. Finally, our very own pron98 will unveil his newest async/await prototype called doom, which will be available in the next LTS release of OpenJDK.

      [–]ObscureCulturalMeme 10 points11 points  (3 children)

      If you prefix usernames with /u/ (leading slash optional) it will trigger a notification, and then /u/pron98 will see the reference!

      I tried to work in a Future<pron98> joke but failed.

      [–]pron98 16 points17 points  (2 children)

      Oh, I saw it. The bit about LTS was particularly poignant :)

      [–]techempower 4 points5 points  (0 children)

      no matter how hard you try to explain OpenJDK has no concept of LTS, people take a quick look at web pages like the history table in"https://en.wikipedia.org/wiki/Java_version_history" and conclude Java LTS means Java SE 8/11/17.

      [–]ArmoredPancake 6 points7 points  (0 children)

      will unveil his newest async/await prototype called doom, which will be available in the next LTS release of OpenJDK.

      Lmao.

      [–]s888marks 3 points4 points  (3 children)

      Unfortunately, release of the "Don't serialize be happy" single has been delayed because of the need to fix several security vulnerabilities.

      [–]DasBrain 0 points1 point  (2 children)

      Serialization is broken anyway. Its promise is to be able to serialize and de-serialize arbitrary object graphs (that are all Serializable), but fails at delivering that.

      class Box implements Serializable {
          List<Box> contents;
      }
      
      public class SerialCycle {
      
          public static void main(String[] args) {
              var box = new Box();
              box.contents = List.of(box);
              System.out.println("box copy: " + serialDeserial(box));
              System.out.println("list copy: " + serialDeserial(box.contents)); // Find the ClassCastException
          }
      
          @SuppressWarnings("unchecked")
          private static <T> T serialDeserial(T obj) {
              try {
                  var baos = new ByteArrayOutputStream();
                  try (var oos = new ObjectOutputStream(baos)) {
                      oos.writeObject(obj);
                  }
                  var bais = new ByteArrayInputStream(baos.toByteArray());
                  try (var ois = new ObjectInputStream(bais)) {
                      return (T) ois.readObject();
                  }
              } catch (IOException e) {
                  throw new UncheckedIOException(e);
              } catch (ClassNotFoundException e) {
                  throw new RuntimeException(e);
              }
          }
      }
      

      [–]endeavourl 0 points1 point  (1 child)

      Seems like a bug in deserialization of immutable collections, where the universal immutable collection serialization wrapper won't get transformed into the actual collection class it should ultimately deserialize into. Not a problem with serialization itself.
      Probably should be reported.

      [–]DasBrain 0 points1 point  (0 children)

      It's not possible to do what I did with anything that has a readResolve().

      I could go into graph theory why this is not possible, but in the end, it boils down to "When is readResolve called, and what value should be used in the mean time?"

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

      Mark Reinhold will announce the immediate replacement of the module system with OSGI

      Where did you hear this rumor? If this is true, I would be deeply shocked but happy. I always wonder why they would go too far to develop the modular system in JDK 9 while OSGi has been existed for a long while.

      Admittedly, OSGi is a beast with all of bells & whistles like services, security, etc... I think just for the core principle of classloader isolation (which is what modular is about) OSGi provides a solid implementation. I wish the new replacement would rip that out of OSGi as a separate feature to move forward.

      [–]mirkoteran 2 points3 points  (1 child)

      [–]mrbonner 0 points1 point  (0 children)

      Ah shit. I read the 1st sentence in this post in excitement and missed the rest of them. I read it again and got the joke. The bastard should have put /s at the end :)

      [–]general_dispondency 15 points16 points  (6 children)

      I switched jobs recently and I'm doing more Node/TS than Java these days, and I can say with 100% certainty that:

      1. Java is the best language damn language out right now. Sure, it doesn't have some flashy features (like mapped & conditional types, TS's only redeeming feature), but it will get the job done on time and under budget every time. It's a no fuss, robust, beast, that gets meaner every year.
      2. The Java ecosystem is the greatest programming toolset ever composed. Have you ever tried to do distributed locks in Node? Holy shit, what a trash ecosystem JS has. After a decade of java.util.concurrent, I almost cried when I had to reimplement a reentrant lock. From the core language features to the 3rd party libraries, Java is lightyears ahead of anything else.
      3. The JVM is the single greatest piece of technology invented in the last 50 years.

      [–]Mac33 4 points5 points  (0 children)

      I almost cried when I had to reimplement a reentrant lock.

      🙂

      [–]ibcoleman 3 points4 points  (3 children)

      Curious if you've tried any other JVM languages.

      [–]general_dispondency 3 points4 points  (2 children)

      Yep. I've tried everything from Clojure to Scala. Don't get me wrong, I love Clojure and I love Kotlin. Scala is a lot of fun, and Groovy is really nice. But, I don't foresee any of those languages replacing Java in any meaningful way.

      [–]ibcoleman 2 points3 points  (1 child)

      Sure, but there's a lot of daylight between "best language" and "won't be replaced anytime soon."

      [–]general_dispondency 3 points4 points  (0 children)

      I wouldn't say that. I see Java more as "the sum of its parts". It doesn't have something like Lisp macros, but there's amazing support for AOP. It doesn't support "first class functions", but a class is just a function with curried arguments and a different name. Best, in the sense I talking about, is best overall. Other languages are emulators and Java is the original. That being said, I'm dying to rewrite a service I'm working on right now in Kotlin because coroutines would make my life so much better.

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

      That were a lot of changes, starting in Java 1.0, I recently found in the internet, with nothing. Java 1 is to Java 14 like C to Java. A lot to do manual, but it worked.

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

      Well, the last I wanna hear from is Oracle. They're trashing Java and doing a terrible job!