4 ms·
I commented here: https://news.ycombinator.com/item?id=42483538 https://news.ycombinator.com/item?id=42483538 Mostly, I find it far less verbose with a couple
by t-writescode 2y ago
I commented here: https://news.ycombinator.com/item?id=42483538 https://news.ycombinator.com/item?id=42483538
Mostly, I find it far less verbose with a couple huge convenience features that I'm constantly using and would feel very lost without; and, they all come as part of the language, rather than bytecode hacks / pre-processors, like lombak
- smrtinsert 2y agoLombok is absolutely painless.
- t-writescode 2y agoI admit I have no direct experience with it. For my perspective on it, I rely on one of the best developers I've ever worked with - especially when it comes to debugging and deep investigation and she *hates* it. If I had to assume (we don't work together anymore), it's because it did some freaky stuff that made debugging the weird bugs really, really hard.
- throwaway8546 2y agoI have been using Lombok for many years and haven't experienced any issues. Admittedly most of my work involves standard Spring Boot services, so perhaps your friend works with some low level projects that behave differently. In my experience I don't hesitate to recommend Lombok. It will generate getters/setter/builders/toString in a transparent way, without visible changes in the code. This keeps Java classes much more concise to read. It also provides withers on records, while waiting for native support (it's coming)
- aembleton 2y agoLombok does provide a lot but it doesn't make types non nullable by default or reduce verbosity or give us extension functions.
- wiseowise 2y agoLombok is absolute garbage. Either use proper Java 2.0 like Scala/Kotlin or stay in Java.
- LinXitoW 2y agoMy biggest pet peeve with Kotlin is that they got rid of checked exceptions and replaced them with nothing at all. All error code flow is now just invisible unchecked exceptions, the single worst kind of error handling imaginable. I know they added the Result type later on, but there's zero convenience to it, so you have to manually handle every error, even if you just want to bubble it. Checked Exceptions were better, though Rust still has the best error handling in any non-functional language.
- bberrry 2y agoDepends on what you're writing I guess (as always). I write backend services and if there is an exception thrown, generally the whole request is forfeit. So a top-level exception handler is all that's needed.. no checked exceptions ruining my lambdas or streams like in Java.
- t-writescode 2y agoNot to mention a top-level exception system is a great place to put the db transaction rollback so everything’s always undone (some exceptions apply)