JPlus is a modern programming language and compiler that acts as a superset of Java — bringing the benefits of null safety and powerful boilderplate code generation declarative features while remaining fully interoperable with existing Java code and libraries.

  • orclev@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    5 days ago

    Well it’s off to a great start in that a very casual review has already found a significant soundness issue. This transpiler adds a nullable type and implicitly makes all other types non-nullable. That’s great but it also adds boilerplate generators for data classes and one of the options for that is to generate a no-arg constructor. I was curious how it handles the combination of those two features. The answer is that it doesn’t. You can declare a class with non-nullable properties, and then auto-generate a no-arg constructor that sets those properties to null.

    You can already do better than this with plain Java plus the Immutables builder library and the findbugs static analysis tools nonnull check. Intellij even has built in support to recognize the nonnull annotation and will do the analysis automatically.