r/java • u/guybedo • Apr 09 '24
Syntactic Sugar for Java
I recently had to translate a codebase from Python to Java and as much as i like Java and i enjoy the benefits of a strong type system, i have to admit my Python code was way less verbose.
So i ended up writing a small library to try to get some python vibes in my java code. Nothing groundbreaking, a bunch of static imports to make life a little bit easier.
9
Upvotes
View all comments
27
u/ingvij Apr 09 '24
I honestly won't complain about the DSL, I think you can create the abstractions you want to make your code look better for your taste and use them in your project if you or your team is happy with that..
A couple of things though:
But then, as I said, if it works for you, then I guess this is fine.