News for hackers. Stuff that matters.
Re:Ask HN: How should I get started learning modern programm... by ThrowawayR2 on Sunday February 20, 2022 @04:17PM (#30409332)
> "Linux applications, possibly MacOS as well"

Probably Java, much as it pains me to say that. Mature language and ecosystem, will have longevity for decades more since it's as deeply embedded in business systems as COBOL was, and can be used for cross-platform GUI applications with a bit of effort.

(Python may be easier but, thanks to the GIL, doesn't deal well with multiple threads of execution and that's the name of the game to get performance from modern multi-core systems.)

Re:Ask HN: How should I get started learning modern programm... by TheMonarchist on Sunday February 20, 2022 @05:49PM (#30410025)
Java was designed to support 80s style OOP. While many mainstream languages do the same, it isn't particularly modern. I haven't followed Java's evolution in the recent years but as I recall it is the last language to adopt anything new.
Re:Ask HN: How should I get started learning modern programm... by Tomte on Monday February 21, 2022 @01:27AM (#30412510)
Lambdas, Streams… Java is far from "80s style OOP" today.

It steals the best from the more avant-garde languages and builds it in coherently. That's no small task, so it takes few years.

Therefore I wouldn't call Java "cutting-edge", but "modern" easily.

Re:Ask HN: How should I get started learning modern programm... by TheMonarchist on Monday February 21, 2022 @05:57AM (#30414294)
> Lambdas, Streams… Java is far from "80s style OOP" today.

Streams are a library feature. At a cursory look Boost seems to have had something similar since 2003: range adaptors[0].

Moreover lambdas have existed since 70s. They are modern only in the sense that Java got them in 2016 or so.

> It steals the best from the more avant-garde languages and builds it in coherently. That's no small task, so it takes few years.

That's a nice way to say that it gets new features only when they are undeniably useful.

> Therefore I wouldn't call Java "cutting-edge", but "modern" easily.

If Java is modern, C++ is cutting edge. It got the syntactic sugar for lambdas in 2011 - five years before Java.

However I may have put too much weight on "modern" in the question title. The demand for Java coders is going to be higher than the supply not unlike COBOL. If you can live with its limitations, you can make a living maintaining Java codebases for decades to come.

[0]: https://www.boost.org/doc/libs/1_78_0/libs/range/doc/html/ra... (Nowadays you would use Eric Niebler's Ranges-v3 when C++20 Ranges aren't available.)

Re:Ask HN: How should I get started learning modern programm... by ThrowawayR2 on Sunday February 20, 2022 @07:00PM (#30410469)
I wouldn't say it's lacking modern features; Java 8 introduced closures, for example. Oracle also increased the pace of Java releases to once every 6 months since Java 9 and generally the features added have been significant improvements.
Re:Ask HN: How should I get started learning modern programm... by Koshkin on Sunday February 20, 2022 @08:43PM (#30411058)
> (OP) Linux applications, possibly MacOS

Indeed, why not Java, then.