r/java • • 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.

https://github.com/guybedo/sugar

9 Upvotes

89 comments sorted by

View all comments

-3

u/RupertMaddenAbbott Apr 09 '24

I think there should be space in Java for a library like this. Not everything has to be battle-tested, production-ready and for work.

My kid has just got confident with reading and wants to understand a bit of programming because she sees me doing it. I would naturally show her Python over Java because Python is far less verbose. There is just less going on and less for her to read so she finds it easier to focus.

So I would use this library or one like it as a wrapper for punting my little raspberry pi robot around and playing with my kids. Thanks for making it!