JPlus is fully compatible with Java, offering modern language features like null safety, boilerplate code generation and other modern language features to reduce developer burden and maximize productivity.

Notably, there is currently no ‘superset’ language that keeps Java syntax almost intact while extending the language with features like null checks at the language level. JPlus aims to fill this gap, providing a language that existing Java developers can naturally learn and adopt.

  • Pamasich@kbin.earth
    link
    fedilink
    arrow-up
    1
    ·
    2 days ago

    Notably, there is currently no ‘superset’ language that keeps Java syntax almost intact

    There’s Groovy. Their examples use a bit different syntax, like a lack of semicolons, and Gradle might also give the wrong idea. But it’s fully compatible with Java source code iirc, just adds its own stuff on top and broadens the allowed syntax a bit.

    • unalivejoy@lemmy.zip
      link
      fedilink
      arrow-up
      2
      ·
      2 days ago

      There is one Groovy syntax that replaces some Java syntax: code blocks now become closures.

      What you can write in Java as

      {
          System.out.println("Hello, world!");
      }
      

      You would have to write in Groovy with a label

      l: {
          System.out.println("Hello, world!");
      }
      
      • JPlus@programming.devOP
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        22 hours ago

        Groovy doesn’t have null safety or boilerplate code generation features. That’s why JPlus was created to address what Java developers truly feel is missing. Go post that comment in the Groovy community.

    • JPlus@programming.devOP
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      2 days ago

      There’s Groovy. Their examples use a bit different syntax, like a lack of semicolons, and Gradle might also give the wrong idea. But it’s fully compatible with Java source code iirc, just adds its own stuff on top and broadens the allowed syntax a bit.

      Groovy is highly compatible with Java and most Java code runs in Groovy without changes. However, it’s not 100% identical. Groovy introduces dynamic typing, additional syntax, and runtime behaviors that can differ from Java. JPlus, on the other hand, aims to keep Java syntax almost intact while adding null-safety and boilerplate code generation making it easier to apply to existing Java projects without rewriting code

      • HelloRoot@lemy.lol
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        2 days ago

        You say:

        Groovy is not 100% identical

        Then you say:

        JPlus aims to keep Java syntax almost intact

        Which implies that it is not 100% identical either.

        So why do you apply that same argument against one but not the other? Seems like marketing bs.

        • JPlus@programming.devOP
          link
          fedilink
          arrow-up
          1
          arrow-down
          1
          ·
          edit-2
          2 days ago

          You say:

          Groovy is not 100% identical

          Then you say:

          JPlus aims to keep Java syntax almost intact

          Which implies that it is not 100% identical either.

          So why do you apply that same argument against one but not the other? Seems like marketing bs.

          As you mentioned, the phrasing might make it seem inconsistent. The key difference here is not whether they are “100% identical,” but the degree and nature of the changes.

          Groovy introduces dynamic typing, optional syntax, runtime behaviors, and other language features that can fundamentally alter how Java code executes. Even if the code compiles, subtle differences in behavior can occur. In contrast, JPlus preserves nearly all standard Java syntax while only adding compile-time null-safety checks and boilerplate code generation. These changes have minimal impact on the execution of existing Java code and are primarily intended to improve safety and developer convenience.

          Additionally, JPlus is currently developed based on Java 20 syntax, with added null-safety and boilerplate code generation features. Therefore, code up to Java 20 is fully compatible. Since future updates will support the latest Java syntax as well, the phrasing “almost identical” is used intentionally. In practice, JPlus will continue to be Java syntax + α.

          Technically, neither language is “100% identical” to Java, but the practical impact is very different. Groovy can alter runtime behavior, whereas JPlus preserves existing behavior almost entirely while adding safety and developer convenience. This is not marketing exaggeration, but a reflection of the difference in the invasiveness of changes.