Professional developer and amateur gardener located near Atlanta, GA in the USA.

  • 37 Posts
  • 3.97K Comments
Joined 1 year ago
cake
Cake day: June 13th, 2023

help-circle






  • This is getting a little better nowadays.

    > cat Hello.java
    void main() {
        System.out.println("Hello, World!");
    }
    > java --enable-preview Hello.java
    Hello, World!
    

    Things to notice:

    1. No compilation step.
    2. No class declaration.
    3. Main method is not public static
    4. No String[] args.

    This still uses preview features though. However, like you demonstrated already, compilation is no longer a required step for simplistic programs like this.



  • Java is amazing and I love it, and I agree that this is not really a good list of problems. (Not that I expect green texts to be well thought out, rational, real, fair, or anything other than hyperbolic rants lol.) There are good reasons to critique it and the ways people use it, but this isn’t it.

    Particularly funny is the one about race conditions. That’s something you’d have to deal with in any sort of multi threaded environment.