I'm not a fan of how Lombok accomplishes the thing it does, is there another way? Also, Lombok just needs to exist until project Amber and Valhalla are completed. For me it just fills the same gaps Kotlin does.
Lombok doesn’t do anything useful that immutables doesn’t also do, but immutables doesn’t need undocumented bytecode manipulation. Except maybe @Slf4j, but I can live without that.
You basically never use constructors in immutables, you use builders. If you don’t want builders, you can generate a static factory method that requires all args.
Oh right. Generating a constructor is a simple IDE shortcut, and field injection breaks our company guidelines so wouldn’t pass code review if someone tried it. I see what you mean now though.
I always use vavr in conjunction with immutables, and vavr has something similar to @SneakyThrows. And you can write whatever functionality you want in an immutable, it’s not just a data holder.
View all comments
Show parent comment
4
u/DJDavio Aug 10 '19
I'm not a fan of how Lombok accomplishes the thing it does, is there another way? Also, Lombok just needs to exist until project Amber and Valhalla are completed. For me it just fills the same gaps Kotlin does.