Live data from Hacker News

Lombok makes Java cool again

bytes.grubhub.com

31–40 of 239 posts

Re: Lombok makes Java cool again

#31
post #12

My main issue with Java is all the annotation based programming. Some of these are nice and can make the easy case super easy but if you need go even slightly off the easy path you seem to quickly loose all the time gained on the easy path. i.e. @GET(url=" http://host/users/$userid" ) public abstract User getUser(String userid) isn't that much easier than the python requests version but much harder if you need to add…

I actually ran into a useful case for annotations in Java the other day.

Compile time dependency injection (Micronaut framework).

Not something I have a use for but it's clever.

https://micronaut.io/

Re: Lombok makes Java cool again

#33
post #29
post #12

My main issue with Java is all the annotation based programming. Some of these are nice and can make the easy case super easy but if you need go even slightly off the easy path you seem to quickly loose all the time gained on the easy path. i.e. @GET(url=" http://host/users/$userid" ) public abstract User getUser(String userid) isn't that much easier than the python requests version but much harder if you need to add…

>custom dynamic header Its just: @RequestHeader("Header") added to the param list.

The secret is that there is always another annotation...

Re: Lombok makes Java cool again

#35
post #12

My main issue with Java is all the annotation based programming. Some of these are nice and can make the easy case super easy but if you need go even slightly off the easy path you seem to quickly loose all the time gained on the easy path. i.e. @GET(url=" http://host/users/$userid" ) public abstract User getUser(String userid) isn't that much easier than the python requests version but much harder if you need to add…

FactoryFactoryStrategyFactoryAgreementChainImplementationProxy

ffsfaci_proxy() is definitely much better.

Re: Lombok makes Java cool again

#38

Java the language is cool. What the enterprise has done with it is not cool. Writing apps with layer upon layer upon layer upon layer of abstraction is ... self defeating. Then they'll holler, we need to rewrite it! All in the name of finding that one true architecture that can handle any business CR. Blech.

Java made some fundamental design decisions at its inception which look like fairly bad ones from today's perspective. It also introduced flawed versions of features like generics later. It also has some pretty poorly designed core libraries. What about it do you consider cool? I find it hard to think of anything I'd want to take from Java if designing a new language today. Even its bad design decisions have mostly been done better by other later languages like C#.

Re: Lombok makes Java cool again

#40

I'm interested in the downsides of using Lombok, since the article seems to only focus on its positives and makes it seem like I should download it and start using it right now. Is there anyone here with Lombok experience that wants to share any issues they've run into while using it? All I can think of right now is the fact that the source code isn't compatible with Java.

You get a more complex (and slower) build. Poorer editor support. It may be hard to upgrade Java version (ie. going from 8 to 11). More string for developers to hang in. I wouldn't use it.
Post reply on HN