

It’s true that the project is still in its early stages and not very large yet. I believe that with consistent effort, the number of people contributing to this project, as well as those who want to use JPlus, will grow over time. Thank you.


It’s true that the project is still in its early stages and not very large yet. I believe that with consistent effort, the number of people contributing to this project, as well as those who want to use JPlus, will grow over time. Thank you.


This is exactly the core problem that JPlus aims to solve.


t’s true that JPlus holds a similar position to TypeScript. However, it is a programming language. Here’s a definition quoted from the main page of the TypeScript website -> “TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.”
Similarly,
JPlus is a Java superset programming language — fully compatible with Java, offering modern language features like null safety, boilerplate code generation, and other enhancements to reduce developer burden and maximize productivity.


The C Preprocessor also does all of those things. That’s expected of a preprocessor. If you say “you can write java code with a bit of extra sugar and JPlus turns it back into ‘regular’ java,” then that’s a preprocessor.
A simple preprocessor only performs code transformation and cannot analyze the meaning of the code or ensure type safety. However, JPlus goes beyond mere transformation by providing static analysis capabilities, such as generating a parse tree and checking nullability. It also includes functionality to automatically generate necessary Java code through the apply syntax. As a result, the combination of performing nullability static analysis and generating code via apply cannot be expressed or handled using any existing Java syntax alone.


JPlus follows standard Java syntax while aiming to be an “Upgraded Java” by adding features that Java developers consider practically useful in real-world projects. This allows existing Java developers to utilize new features with minimal learning curve. All features are added on top of Java syntax. For example, null-safety syntax (type?, ?.) and boilerplate code generation syntax (apply). As a result, developers can experience an enhanced version of Java while continuing to use existing Java code and libraries without modification. This should clarify exactly where JPlus fits in the ecosystem.


Thank you for the excellent question.
JPlus is currently implemented at the MVP level. Therefore, all Java library interfaces are treated as non-null by default. As a result, developers need to manually check for nullability when interacting with Java libraries.
When referencing Java library objects, always declare the variables as nullable (type?) and use the null-safe operator (?.) when accessing them to prevent null pointer exceptions (NPEs).
In future implementations, we plan to leverage nullability annotations in Java library code to add null-checking logic. However, since not all Java libraries include such annotations, developers will still need to manually handle null checks. The same applies to Kotlin: platform types are used, so developers are responsible for performing null checks.
In the current JPlus MVP, when converting to Java code, nullability information specified in the JPlus files is not converted into @Nullable/@Nonnull annotations.
Therefore, using static analysis tools that rely on these annotations may cause issues at compile time.
This feature will be supported in the next version, which will include conversion to @Nullable/@Nonnull. Thank you for your valuable feedback.
Finally, for faster responses, please post any future questions on the JPlus GitHub Discussions page: https://github.com/nieuwmijnleven/JPlus/discussions.


Didn’t I make myself clear? If you find it uncomfortable because you think it’s an advertisement, just move along. What do you think you’re doing? Look at the project I’m working on before you speak. You have no idea how much effort has gone into it. Calling it a scam is truly absurd.


The idea might be enough. Lots of companies running legacy code would be interested in this idea since it would make maintaining/patching it easy.
Thank you for your response. I will take your valuable feedback into careful consideration.


First of all, thank you for your interest in the JPlus project. I also apologize if anything I said earlier came across as rude.
The point I think was misunderstood is that, while the content of the posts is similar, the links they contain are different. To clarify once again, the link in this post directs to the JPlus GitHub repository, whereas the link in the post you mentioned points to the JPlus blog on Hashnode. Please check again.


Yoy won’t find your target audience here on lemmy.
Instead you should look for companies that have open job/freelancer positions for maintaining legacy java code and pitch your project to them.
That’s a great idea. Thank you. However, I’m not sure if such opportunities would be available at my current stage.


You can probably adopt both for a large existing project. Old files get compiled with JPlus, new files will be written in Kotlin. Old files can also gradually be ported to kotlin.
Exactly, that could work. You can keep the existing files as they are and compile them with JPlus, while writing new modules in Kotlin to adopt it gradually. JPlus can serve as a stepping stone before moving fully to Kotlin. However, converting all Java code in an existing project to Kotlin would not only carry significant risks but also be costly. With JPlus, you can fully leverage the proven existing Java codes.


Please check this post: Making your Java code null-safe without rewriting


Is this your first time here? The link in this post leads to the GitHub JPlus repository, while the other posts ultimately link to explanations on how to handle null safety using the JPlus IntelliJ plugin. Aside from the brief introduction, check out the additional links.


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.


“Yeah, Kotlin. The real The End”, just kidding :)


As the title suggests, this page is an introduction to the project, while the other posts focus on how to use it.


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.


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.


From Wikipedia:
In computer science, a preprocessor (or precompiler)[1] is a program that processes its input data to produce output that is used as input in another program. […], which is often used by some subsequent programs like compilers.
The emphasis is mine.
Both Typescript and SASS are examples of preprocessors.
By that logic, the C compiler would also be a preprocessor since it converts C code into assembly. Simply calling something a preprocessor just because its output is source code is not logically correct. The same applies to JPlus: the fact that it ultimately produces Java source code does not make it a preprocessor. Internally, it performs compiler-level processes such as AST generation, null-safety checks, and boilerplate code generation, so it should be regarded as a proper compiler.
JPlus is an open-source project. Anyone can review the implementation details on GitHub: https://github.com/nieuwmijnleven/JPlus