justicecoder

joined 7 months ago
[–] justicecoder@programming.dev -3 points 7 months ago* (last edited 7 months ago)

Thank you for the excellent question.

1. How does JPlus handle null safety in Java library interfaces?

  • 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.


2. If nullability information is a type metadata extension for compile-time checking, does that inevitably break on library interfaces when I create both library and consuming app with JPlus?

  • 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.

[–] justicecoder@programming.dev -5 points 7 months ago (2 children)

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.

[–] justicecoder@programming.dev 2 points 7 months ago

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.

[–] justicecoder@programming.dev -1 points 7 months ago (1 children)

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.

[–] justicecoder@programming.dev 3 points 7 months ago (2 children)

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.

[–] justicecoder@programming.dev 1 points 7 months ago* (last edited 7 months ago)

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.

[–] justicecoder@programming.dev -1 points 7 months ago* (last edited 7 months ago)
[–] justicecoder@programming.dev -1 points 7 months ago (3 children)

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.

[–] justicecoder@programming.dev 1 points 7 months ago* (last edited 7 months 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.

[–] justicecoder@programming.dev -1 points 7 months ago

"Yeah, Kotlin. The real The End", just kidding :)

[–] justicecoder@programming.dev 1 points 7 months ago (6 children)

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

[–] justicecoder@programming.dev 2 points 7 months ago

Ok, didn’t want to discourage you!

Thank you for your interest. We hope you’ll continue to follow the project’s progress!

 

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 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 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 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 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 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.

view more: ‹ prev next ›