News for hackers. Stuff that matters.
Re:Has UML died without anyone noticing? by philwelch on Sunday April 25, 2021 @04:52PM (#26936573)
> Still to this day, I have absolutely no idea how people can write Java for line-of-business applications (its bread-and-butter!) and remain sane from having to manually manage data-flow, implementing Java Beans, and manually writing by-hand getter-and-setter methods...

Lombok, at the very least, eliminates “manually writing by-hand getter-and-setter methods” (https://projectlombok.org/).

Re:Has UML died without anyone noticing? by DaiPlusPlus on Sunday April 25, 2021 @07:31PM (#26937738)
Thank you. I stopped using Java on a regular basis around late-2009-ish, which was before Lombok became really popular (as far as I know) so it is encouraging to hear that writing Java in-practice isn’t as bad as I feared.

Still... I feel strongly that Java eventually needs to adopt object-properties and reified-generics for it to stay relevant - otherwise it offers fewer and fewer advantages over competing languages - at least for greenfield projects at first, and eventually it’ll start being _uncool_ and fail to attract newer and younger devs to keep the ecosystem alive. Then we’ll end up with the next COBOL (well, more like the next Pascal/Delphi...)

Re:Has UML died without anyone noticing? by philwelch on Monday April 26, 2021 @12:05AM (#26939167)
That seems unnecessarily harsh towards Pascal/Delphi. I’d stick with the COBOL metaphor.

I’d also add that while Java does suck in some fairly obvious ways, most languages suck and at least Java can actually run concurrent threads in parallel.

Re:Has UML died without anyone noticing? by lmm on Sunday April 25, 2021 @07:42PM (#26937815)
Lombok ends up having all the costs of using a better JVM language (you still need to integrate it into your coverage tools, code analyzers etc.) but with few of the benefits. I used to use Lombok but in the end it was easier and better to just use Scala.
Re:Has UML died without anyone noticing? by philwelch on Sunday April 25, 2021 @11:56PM (#26939114)
That’s fair. When I was writing Java code I wanted desperately to evaluate Kotlin, for the obvious reasons you’d expect, but there was not an easy Lombok-to-Kotlin migration path.

I probably would not choose Java with Lombok for a greenfield project today, were it up to me. But if I was forced to use Java, I would use Lombok. I was forced to use Java and I did use Lombok, and it didn’t really suck that bad.

Re:Has UML died without anyone noticing? by lmm on Wednesday April 28, 2021 @07:04PM (#26975364)
I don't think any reasonable decisionmaker would approve Lombok and not Kotlin or Scala. (But I'm aware that many large organisations end up making unreasonable decisions).

The gap between post-8 Java and Kotlin is pretty small yeah. Though you have to write a lot of async plumbing yourself, and not having delegation is a real pain.

Re:Has UML died without anyone noticing? by philwelch on Wednesday April 28, 2021 @11:14PM (#26977017)
> I don't think any reasonable decisionmaker would approve Lombok and not Kotlin or Scala. (But I'm aware that many large organisations end up making unreasonable decisions).

For whatever reason, it’s a lot easier for most organizations to sign off on using a specific library for an existing programming language, even one as transformative as Lombok, than to sign off on using a different programming language, even one as backwards-compatible as Kotlin. Often they are categorically different decisions in terms of management’s interest in micromanaging them: they might default-allow you to include libraries and default-disallow you to write code in a different language.

In this respect, Lombok is really handy for a very common form of unreasonable organization :)