News for hackers. Stuff that matters.
Re:Lombok makes Java cool again by hodgesrm on Thursday January 31, 2019 @08:21PM (#19050798)
Which design patterns are you thinking of and which languages had them? The original gang of four Design Patterns book is filled with C++ examples, most likely because almost nobody was using Java in 1995 outside of a few people at Sun.

More generally comparison and hashing methods seem like small potatoes compared to locking primitives, portability, and a large, well-documented class library that have made Java ideal for a very large fraction of business applications. There are many things to criticize in Java but the points you list don't seem to be especially important compared, say, to the relatively steep learning curve/complexity vs languages like modern Javascript.

Re:Lombok makes Java cool again by zestyping on Friday February 01, 2019 @08:56PM (#19060507)
I'm not saying Java doesn't have other strengths. It certainly does! It also has stupid weaknesses.

Many of the popular design patterns are simply lambda. If you have first-class functions, they are trivial. But Java doesn't have first-class functions; instead you have to write a giant thing that looks like a class, and because that feels like a lot of work, it seems to deserve a fancy name like Observer or Strategy. But it's all fabricated work; the only reason you have to do it is that the language has this stupid weakness.

It's as though you were working in a language that didn't have lists. And one day you realize, hey, it's useful to be able to manipulate variable-length collections of things. So you look at a problem and say "Aha, this is exactly the place that we should use a Collection design pattern" and you go write the entire implementation of lists from scratch and feel satisfied that you did a good day's work. You tell all the programmers you know that there is this great design pattern called a "Collection" that they should all start using. You write books about it. You give workshops. You get really good at writing list implementations, because every time you need one you implement a new list from scratch.

When you tell a Python programmer this, she looks at you like you have lost your mind, writes a function that takes a list, solves the problem in 5 minutes, and gets on with her day.

Re:Lombok makes Java cool again by int_19h on Thursday January 31, 2019 @11:50PM (#19051667)
C++ circa 1995 was a lot more like Java with manual memory management, really. Templates were a rare sight, STL was not yet a thing, and it was still considered an impure OO language rather than multi-paradigm.
Re:Lombok makes Java cool again by pjmlp on Friday February 01, 2019 @05:05AM (#19052965)
STL wasn't a thing, but MFC, OWL and ATL surely.
Re:Lombok makes Java cool again by int_19h on Friday February 01, 2019 @06:16PM (#19059716)
These were also closer to Java libraries of late 90s in design. Even ATL mostly used templates to optimize (using the curiously recurring template pattern, usually).

Qt was also born in that era, and look at how strikingly similar its standard library is to Java's in many cases, and how unlike STL and Boost.

Re:Lombok makes Java cool again by pjmlp on Saturday February 02, 2019 @02:21AM (#19061663)
The way you state it feels like it was C++ that copied those designs, when it was the other way around.

I cannot speak for Boost, but STL is also not free of OOP as such, iostreams, data-structures, allocators.

ATL was all about using templates, as optimization or not, one is on template land when using ATL, it is even part of the name.