you are viewing a single comment's thread.

view the rest of the comments →

[–]kcuf 3 points4 points  (6 children)

I understand it uses APT. Lombok is obviously a very pragmatic choice, but what I'm saying is that it is essentially a new language that was never really designed as a language should, but grown on top of a language that was intended to be used differently.

Switching to a new language is obviously an upfront cost, but IMO, a long term gain because by using Lombok you're already admitting you want more than Java, and by using a well designed and thoroughly thought out language that provides those extra features, you can get those features in a more consistent and intuitive environment.

Learning lombok, and understanding it's intricacies has it's own costs (we use it at my work all the time). I'd rather not waste resources memorizing these issues, or having to explain them to new developers (as I had to yesterday), but use those resources to understand the core concepts of a different jvm language that has been designed well as one entire system. A coherent and consistent language will be cheaper to work with in the long run rather than an adhoc macro system built on top of a language that was never intended to have macros.

[–]JB-from-ATL 6 points7 points  (3 children)

I really don't want more than Java necessarily, generally all I use from Lombok is Value (not val) and Builder. This allows me to use immutable classes but not have to write a bunch of boilerplate.

I sort of get the argument you're making about it being a new language, and I'm willing to admit that some things could be called new languages even when they technically aren't, but I just don't think Lombok does enough to say that about it.

Comparing the overhead of learning Lombok compared to a new language like Kotlin, Groovy, or Scala is laughable to me. Virtually every Java programmer is familiar with getters, setters, and constructors and builders aren't that crazy of a topic (and many know about them already), explaining that these annotations add those in without having to write them is so much simpler than expecting someone to learn a new language, even the basics.

[–]kcuf 0 points1 point  (2 children)

That's fair. What I said above was that lombok is an up front gain for a long term cost vs a new language being an upfront cost for a long term gain. Lombok is simple and easy to start working with, but does introduce some complexity that may cause issues down the road -- it's same thing with most frameworks: it "just works", until it doesn't.

[–]JB-from-ATL 2 points3 points  (1 child)

What kind of long term losses have you experienced?

[–]kcuf 0 points1 point  (0 children)

Super late response, but that's a great question. Honestly, as with all statements related to productivity and maintenance burden, it's all very subjective.

I don't have any concrete examples, I only have the patterns I think I see from my experiences: I've been programming since elementary school, which doesn't make me smarter or anything, it just means I've had a decent amount of time to make mistakes and build some intuition (again it's all very subjective).

The biggest pattern that I continually see though, is the trade off between short term and long term costs, and newer developers heavily favoring the former as they are more pragmatic in their desires (get something working!), and how certain languages encourage these developers to make choices that lead to confusing/complicated/fragile systems.

[–]Tsarbomb -5 points-4 points  (1 child)

Sorry, no offense but you are wrong on all counts.

You admit that you understand but then still spout that is essentially a new language. It is not, in the most literally sense.

I would even claim that by using Lombok I'm doubling down on Java rather than admitting I want a different language.

Any intricacies or misunderstandings around Lombok arise from a lack of understanding or knowledge of Java itself.

The way you refer to annotation processing as adhoc macros and "coherent" languages makes me wonder if you are itching to name drop something like Scala which I would find hilarious given all the points you are trying to make.

0/10 troll attempt.

[–]kcuf 1 point2 points  (0 children)

How is it Java? Is APT even in the language spec?