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.

    • JPlus@programming.devOP
      link
      fedilink
      arrow-up
      4
      ·
      29 days ago

      Isn’t kotlin a better option?

      Kotlin is great for null-safety, but JPlus allows you to enforce null-safety without rewriting your existing Java code, which can be easier for teams working in legacy projects or who prefer staying in pure Java.

      • Mihies@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        29 days ago

        AFAIK Kotlin and Java code can co-exist as source level. Never tried it though. I guess it depends on the end case scenario what to use.

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

          AFAIK Kotlin and Java code can co-exist as source level. Never tried it though. I guess it depends on the end case scenario what to use.

          JPlus retains almost all of Java’s syntax while providing conveniences like null checks, allowing Java developers to use it immediately without additional learning. In contrast, Kotlin can utilize Java classes but requires learning Kotlin syntax and its libraries, and it cannot use Java syntax directly or automatically guarantee null safety. Therefore, JPlus offers a distinct advantage over Kotlin.

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

    Things can get confusing if the explanation is too long, so here’s a concise way to put it.

    It’s not entirely clear whether Groovy includes 100% of Java syntax, but in my view, Groovy focuses on enhancing the language itself, addressing areas where it falls short compared to modern languages.

    On the other hand, JPlus is similar to how TypeScript addresses JavaScript’s lack of type safety: it focuses on strengthening Java’s safety while improving developer convenience through features like boilerplate code generation. Importantly, JPlus code always compiles down to standard Java, which means it can be integrated seamlessly into existing Java projects without changing the build environment or toolchain.

    In short:

    Groovy: Focuses on enhancing the expressive power of Java, adding modern language features and syntactic flexibility.

    JPlus: Focuses on enhancing language safety and developer convenience, while maintaining full compatibility with Java. This allows developers to adopt JPlus without worrying about breaking existing Java projects.

  • FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    25 days ago

    Interesting. But can’t you do basically the same thing with @nonnull annotations? I remember using something like that a decade ago when I last wrote Java.