Created
October 22, 2025 12:54
-
-
Save nieuwmijnleven/800a31d7f6ac99cf3f816f00315faa5f to your computer and use it in GitHub Desktop.
π Introducing JPlus β A Java Superset with Built-in Null Safety and Boilerplate Elimination
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://github.com/nieuwmijnleven/JPlus | |
| JPlus is a modern programming language and compiler that acts as a superset of Java β | |
| bringing the benefits of null safety, concise syntax, and powerful declarative features | |
| while remaining fully interoperable with existing Java code and libraries. | |
| β¨ Why JPlus? | |
| Java is a powerful and battle-tested language, but developers often face: | |
| Verbose boilerplate (getters/setters, constructors, etc.) | |
| Dangerous NullPointerExceptions | |
| Lack of modern language features like ?: (Elvis), smart casts, or pattern matching | |
| JPlus solves this by introducing modern features on top of Java β without breaking compatibility. | |
| JPlus code compiles to standard JVM bytecode, enabling full use of Java libraries and frameworks. | |
| π Null Safety & Modern Syntax Features | |
| JPlus enforces strict null checks at compile-time and introduces Kotlin-style operators: | |
| Feature Description | |
| Type vs Type? Explicit non-nullable and nullable types | |
| ?. Null-safe access operator | |
| ?: Elvis operator for default/fallback values | |
| Smart Casts Safe type narrowing after null checks | |
| Type Inference Reduce verbosity, no need to declare obvious types | |
| Pattern Matching Clean switch/if logic with type-safe guards | |
| Async Syntax (planned) Future-ready syntax with async/await support | |
| π§ NEW: apply Syntax for Replacing Lombok | |
| JPlus introduces the new apply statement β a powerful declarative alternative to Lombok annotations. | |
| π Replace This: | |
| @Data | |
| @AllArgsConstructor | |
| @NoArgsConstructor | |
| @Builder | |
| public class User { | |
| private String name; | |
| private int age; | |
| } | |
| β With This: | |
| apply data, builder, constructors(all, no); | |
| public class User { | |
| private String name; | |
| private int age; | |
| } | |
| π‘ Even Nested Classes: | |
| apply data, constructor(required, all, no), builder; | |
| apply { | |
| User.Profile: getter, setter, equality, constructor(all); | |
| } | |
| public class User { | |
| private String name; | |
| private int age; | |
| public class Profile { | |
| String nickname; | |
| } | |
| } | |
| All boilerplate β constructors, getters/setters, toString, equals, builder β generated as plain Java. | |
| For full code and output, see: | |
| Go to Example 6 | |
| π Coming Soon: IntelliJ Plugin | |
| We are actively developing an IntelliJ IDEA plugin to provide: | |
| π Syntax highlighting and autocomplete for .jplus files | |
| β οΈ Real-time null-check error detection | |
| π One-click compile-to-Java and build integration | |
| Stay tuned β the plugin will make JPlus production-ready for real-world development! | |
| π Support Development | |
| JPlus is a one-person open-source project under active development. | |
| If you find value in this work and want to help shape the future of Java development: | |
| π Github Sponsors | |
| π Support the Project via PayPal | |
| Your contribution supports language tooling, plugin development, and community outreach. | |
| The benefits will ripple across the entire Java community. | |
| π¬ Get Involved | |
| β Star the project on GitHub | |
| π Report bugs and suggest features | |
| π§ Contribute code or docs | |
| π¬ Join the community discussions (coming soon) | |
| π Learn More | |
| JPlus GitHub Repository | |
| https://github.com/nieuwmijnleven/JPlus | |
| License (Apache 2.0) | |
| JPlus is here to modernize Java while respecting its legacy. | |
| Let's build a safer, cleaner, and more expressive future β together. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment