Java Language Update - Early 2024 Edition

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 พ.ย. 2024

ความคิดเห็น • 40

  • @JanMichalSzulew
    @JanMichalSzulew 8 หลายเดือนก่อน +5

    Never heard of Viktor before, but he's my hero because of the Gatherers API.
    That being said Concise Method Bodies cannot come soon enough

    • @viktor_klang
      @viktor_klang 8 หลายเดือนก่อน +1

      Thank you for the kind words, Jan! Feedback on Gatherers is most welcome :)

  • @terribleprogrammer
    @terribleprogrammer 8 หลายเดือนก่อน +3

    Glad, Java language developers woke up! 🔥

  • @GodTierGamerYT
    @GodTierGamerYT 8 หลายเดือนก่อน +11

    Java is ruling from last 2 decade and it is gonna rule for next decade as well.

    • @ianmarteens
      @ianmarteens 8 หลายเดือนก่อน +2

      Java is pathetic. And True Believers are obnoxious.

    • @maximus1172
      @maximus1172 8 หลายเดือนก่อน +2

      Lol keep dreaming

    • @rathinaveluthiruvenkatam6203
      @rathinaveluthiruvenkatam6203 5 หลายเดือนก่อน +1

      So it will die after 10 years?! Good prediction, perhaps a little optimistic!

    • @JuanGarcia-zy8yw
      @JuanGarcia-zy8yw 4 หลายเดือนก่อน

      @@ianmarteenssure it is .. 25 years later still strong ..I don’t believe nothing.. but as of now Java is greatly relevant.. results don’t lie..

    • @ianmarteens
      @ianmarteens 4 หลายเดือนก่อน

      @@JuanGarcia-zy8yw 4 billion flies love crap. They couldn’t be that wrong, sure? Now seriously, I’ve just have spent some months writing optimized SIMD code for finance in .NET. I enjoyed it. Now I’m trying to do the same with Java. Literally impossible. The SIMD library is still buried inside their JDK, as an “incubation”. It runs twice as slow as .NET’s. My valuation engine for interest rate derivatives is twice faster in C# compared to Java 17. And I can go on and on, if you want.

  •  8 หลายเดือนก่อน +2

    Java is a powerful and versatile language that has been evolving rapidly in recent years. I am amazed by the new features and improvements that have been introduced, such as records, pattern matching, sealed classes, and more. However, I also recognize that Java is not the only language that has these capabilities. Many other languages, such as Kotlin, Rust, Go, and JavaScript, have been using similar or even more advanced concepts for a long time. I appreciate and respect the work of the developers and communities behind these languages, and I draw inspiration from them. I believe that being humble and open-minded is a good quality for any programmer, as it allows us to learn from each other and create better software. I would like some kind of mention of those languages, some comparative analysis and trade-offs

    • @TJ-hs1qm
      @TJ-hs1qm 8 หลายเดือนก่อน +1

      on the JVM Scala is defacto the benchmark for FP style programming and type theory . We already
      had ADTs and pattern matching 15 years ago 😅 It took everybody else to play catch.

    • @Andr805
      @Andr805 8 หลายเดือนก่อน +2

      ​@@TJ-hs1qm The only functional language on JVM is Clojure, Scala sits in between of FP and OOP.
      While Scala can be the benchmark for something, it has never gained popularity to become the next big thing. I remember in ~2016-18 everyone was talking about Scala, but it never got beyond just talks about how Scala is great.

    • @rathinaveluthiruvenkatam6203
      @rathinaveluthiruvenkatam6203 5 หลายเดือนก่อน

      At last JDK team has experts in C, Python, groovy, Kotlin and Rust!

  • @oliverbrown-c1i
    @oliverbrown-c1i 8 หลายเดือนก่อน

    Highly informative video on programming language. Great for beginners!🤠

  • @pompiuses
    @pompiuses 8 หลายเดือนก่อน +3

    When does proper null safety come? It’s also clunky to model pure data without “free” functions (outside classes).

    • @TheBigLou13
      @TheBigLou13 8 หลายเดือนก่อน +2

      In regards to manual garbage collection / free: Yes, that could be a useful functionality to have.
      In regards to null safety: You can *always* do Optional.of(nullable).orElse("") or use primitive data types to never face a null value.
      Additionally you can make a variable final to enforce that a value gets set.

    • @donwinston
      @donwinston 8 หลายเดือนก่อน

      Good grief, just make a static class of functions.

    • @pompiuses
      @pompiuses 8 หลายเดือนก่อน

      @@donwinstonYes, that is the alternative. It essentially makes the class act as a package with functions. This would look much better and more intuitive with free functions and records inside a package.

    • @pompiuses
      @pompiuses 8 หลายเดือนก่อน

      @@TheBigLou13Using Optional in a data structure is bad and should be avoided. Some times null simply can’t be avoided. In these cases compiler support for null safety would be nice.

    • @maruseron
      @maruseron 8 หลายเดือนก่อน +2

      @@TheBigLou13 Optional is not a fully featured Option monad, and it desperately lacks the benefits of being modeled as an ADT. Moreover, it's not supposed to be used to store data, but as a return value to indicate possible absence - for implementers, the hassle of dealing with null is still pretty much real. A null aware type system is very desperately needed, specially for a language that picked nullability as a default.

  • @feryadialoi2244
    @feryadialoi2244 8 หลายเดือนก่อน +1

    the pattern binding use flow-based scoping is interesting
    the first time I know it works when I inverted the if statement using Intellij,
    guess what? the Intellij once again is so amazing

  • @rathinaveluthiruvenkatam6203
    @rathinaveluthiruvenkatam6203 5 หลายเดือนก่อน

    Tomorrow sometime you will have Java without mandatory class! Write functionally .Javac 'preprocessor(!)' will add boiler plate class wrapper! Python does it with ubiquitous 'main' module already. Like CPython behind Python, Cjava will be there, for 'fully' functional Java !

  • @TheBigLou13
    @TheBigLou13 8 หลายเดือนก่อน +7

    35:33 I like it all, except that the first "&&" in a *composite* switch *condition* got renamed to "when".
    if, case, when... Will there be a "once" condition in the future?
    It's too much.

    • @TheBigLou13
      @TheBigLou13 8 หลายเดือนก่อน +4

      We're used to see "case" in switch statements out of tradition, but what if we simplify conditions and become more approachable and clear overall:
      String text = switch (value) {
      if 1 -> "one";
      if 2 -> "two";
      if 3 -> "three";
      if 4 -> "four";
      }
      See how clean it is? Lets try pattern matching with guards:
      switch (value) {
      if ValueClass v && v.range > 1 -> doSomething(v);
      if NonValueClass v -> {
      v.doSomethingElse();
      v.doThisAfterwards();
      }
      }
      THIS feels good.

    • @TheBigLou13
      @TheBigLou13 8 หลายเดือนก่อน +5

      To think even further ahead, if we're already on the topic of redefining switch - Why not leave out the "case" entirely:
      String text = switch (value) {
      1 -> "one";
      2 -> "two";
      3 -> "three";
      4 -> "four";
      }
      switch (value) {
      ValueClass v && v.range > 1 -> doSomething(v);
      NonValueClass v -> {
      v.doSomethingElse();
      v.doThisAfterwards();
      }
      }
      Or even shorter, if you dare to allow pattern instantiation and access in one:
      switch (value) {
      ValueClass v.range > 1 -> doSomething(v);
      NonValueClass v -> {
      v.doSomethingElse();
      v.doThisAfterwards();
      }
      }
      Which would allow neat things like this in a way more readable form:
      String text = switch (value) {
      Integer i "one or less";
      2 -> "two";
      3 -> "three";
      Integer i >= 4 -> "four or more";
      }
      Compared to how you'd currently have to write it:
      String text = switch (value) {
      case Integer i when i "one or less";
      case 2 -> "two";
      case 3 -> "three";
      case Integer i when i >= 4 -> "four or more";
      }

  • @rathinaveluthiruvenkatam6203
    @rathinaveluthiruvenkatam6203 5 หลายเดือนก่อน

    At last JDK team has experts in C, Python and Rust!

  • @ansgarnell9316
    @ansgarnell9316 2 หลายเดือนก่อน

    Personally, I find this a little bit confusing:
    String x = "";
    if (!(x instanceof String s) || s.length()

  • @simonhartley9158
    @simonhartley9158 8 หลายเดือนก่อน

    For the AsyncResult, might we no longer have access to the cause or any suppressed exceptions from the InterruptedException?

  • @gs-e2d
    @gs-e2d 8 หลายเดือนก่อน +5

    Yo first commetn, tired of waiting for valhalla, lilliput.

  • @HuapinChiu
    @HuapinChiu 8 หลายเดือนก่อน +1

    User
    I was not convinced. Not very excited about the future.

  • @31redorange08
    @31redorange08 8 หลายเดือนก่อน

    The presentation was well-crafted until the pseudo-code slide at 44:36.

  • @rathinaveluthiruvenkatam6203
    @rathinaveluthiruvenkatam6203 5 หลายเดือนก่อน

    So old Java is a poor language. Tomorrow this will be poor! Arrogant Old java bows, without honestly acknowledging, to Python, Groovy and venerable C (function pointer of C is method pointer of Java!!). Learn Python for all , Rust for System Work. Kotlin for android.

  • @gsestream
    @gsestream 8 หลายเดือนก่อน +1

    how about foundation classes for jvm and not the things the programmers can do with java, let the users do the java libraries, mostly, focus on the language platform. I mean hardware/os interface is the major part of java, not the user libraries. dont fall in the c++ std library rabbit hole. tools not the product, as you dont know what the end product will be. a library in wrong place does not help. its clutter.

    • @gsestream
      @gsestream 8 หลายเดือนก่อน

      one more: every non-array object should be considered as size one array for simple usability and syntax interop. I mean there should not be a single variable entities but only arrays, from zero to one to any size. or even if there is things like "int x=0;" then that x should be considered as "int[] x={0};" in all cases. in computer memory there is no such a thing as single variable, but a range of variable addresses which is always a memory range, array. sometimes more complex looking thing is more simple engineers keeping it simple.

    • @gsestream
      @gsestream 8 หลายเดือนก่อน

      why do you need "new" keyword, you would just do MyClass myclass = MyClass(), or int[] intarray = int[5];

    • @gsestream
      @gsestream 8 หลายเดือนก่อน

      both java and javafx (if using java window refresh system) seem to have jittery frame pacing that the translating camera rendering image flow becomes not very nice to look at.

    • @gsestream
      @gsestream 8 หลายเดือนก่อน

      why does a thread running completely separately from its starter and data induce hickups on a totally separate function in the same application. emphasis on the thread independency in all manners. there is no shared data being used, including window, other than same application main context. say the other thread is calculating some maths without direct contact to the other functionality, and still the thread affects when it should not. all swing related operations including main window dragging around will be lagged by same 0.5sec stutter.

    • @gsestream
      @gsestream 8 หลายเดือนก่อน

      java .jar files need module-path (not only class-path)