this post was submitted on 10 Nov 2025
4 points (100.0% liked)

Learn Programming

2020 readers
4 users here now

Posting Etiquette

  1. Ask the main part of your question in the title. This should be concise but informative.

  2. Provide everything up front. Don't make people fish for more details in the comments. Provide background information and examples.

  3. Be present for follow up questions. Don't ask for help and run away. Stick around to answer questions and provide more details.

  4. Ask about the problem you're trying to solve. Don't focus too much on debugging your exact solution, as you may be going down the wrong path. Include as much information as you can about what you ultimately are trying to achieve. See more on this here: https://xyproblem.info/

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 2 years ago
MODERATORS
 

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.

all 2 comments
sorted by: hot top controversial new old
[โ€“] orclev@lemmy.world 1 points 1 week 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.