Live data from Hacker News

Java 16

jdk.java.net

111–120 of 327 posts

Re: Java 16

#111
Looks like they added sensible no-boilerplate immutable data objects, and are trying to unbox their boxed primitives, yay for common sense at long last.

While they're about it, they should also add immutable/copying data structures.

Re: Java 16

#112

As a student most of the way through a Java course, I'm wondering what Java is still used for. Java applets are dead, Android is moving on to Kotlin (apparently Google got in legal trouble with Oracle even though Java is "open source?"), and I can't think of any desktop applications that use Java anymore. Java is supposed to be able to "run anywhere," yet C++ is more portable because it doesn't require the JVM to run…

Java is used all over the place for various backend applications, e.g. data processing, web backends. It's fast, well documented and has a great standard library and ecosystem. In many of these applications you control the deployment environment, so making sure that your container has the JVM isn't an issue.

Re: Java 16

#114

As a student most of the way through a Java course, I'm wondering what Java is still used for. Java applets are dead, Android is moving on to Kotlin (apparently Google got in legal trouble with Oracle even though Java is "open source?"), and I can't think of any desktop applications that use Java anymore. Java is supposed to be able to "run anywhere," yet C++ is more portable because it doesn't require the JVM to run…

We use it on servicing the backend of an e-commerce website. The code is now 2 decades old and wonderfully refactorable to modern code.

Re: Java 16

#115

Earlier quoted context omitted.

Every thread about new Java version has the same comment all the time. Why share it? What kind of response do you seek?

I think it's interesting to discuss how many are stuck on java8. It was a long time many of us were stuck on java6 or 7, and finally got up to java8. But then when 9, 10 and 11 came no one made an effort to upgrade. Why? And now we're at 15 and people are starting to feel the heat. We only migrated our main service from 8 to 15 a month ago (AWS deprecation), but still have lots of 8 code laying around (luckily some o…

Speaking from personal experience, the creators of most of the recent JDK versions have made very poor efforts to explain the changes, it's mostly just a list of RFC type documents, and who has time?

An example of something that compares favourably would be Go, where they always blog about the changes, and there's easy to find official language documentation (and not just autogenerated API docs).

Re: Java 16

#116
post #75

Earlier quoted context omitted.

Another thing to note that cutting edge languages do not always deliver great features , they also deliver with great frequency half baked features to be discarded or deprecated in few years. Also since most effort spent on language , tooling remain primitive and slow for long time. So I do not see them a sure win for projects I work on.

FWIW, I feel that way about Scala, but not F#. The only big F# feature I know of that's fallen out of favor is type providers, and, IMO, that's not because the feature was half-baked so much as because it was one of the many casualties of .NET's transition to being a truly cross-platform toolkit.

Because Scala is a truly innovative and experimental language that came out of a programming language research group. That's why there's a lot of features that didn't play out well in real-world. F# started out as .NET rendition of OCaml. Most languages initiated by large crops don't try to be innovative, rather they take approaches introduced by different niche languages (many of them are only for research purpose) and incorporate to their language. Languages that try cater to a large audience should be adopting features from experimental languages.

Re: Java 16

#117

As a student most of the way through a Java course, I'm wondering what Java is still used for. Java applets are dead, Android is moving on to Kotlin (apparently Google got in legal trouble with Oracle even though Java is "open source?"), and I can't think of any desktop applications that use Java anymore. Java is supposed to be able to "run anywhere," yet C++ is more portable because it doesn't require the JVM to run…

I work on the trading floor of an investment bank in Hong Kong. Our OMS is made entirely in low latency Java (no GC, lots of perf test, few C++ binding when really we must).

Java allows us, contrary to our poor colleagues in algo still on C++ to work in team, manage dependency, use really good tooling, unit test easily, have libraries that work consistently all across the universe (that's a beef I have with Python: every library seems to work differently with different casing and principles so I have to read enormous doc all the time bleh). It compiles fast enough, every monkey joining has done enough Java at university to get started, and it prunes all the autists who love complex one-liners and attract people more into team work and well-organized simple stuff. As for profiling, I still have to meet a C++ colleague with a good efficient profiler in my company, while us monkeys in Java (C# is great too tbh) can just run a graphical profiler, click on 3 buttons, and find what's not optimal.

Java isn't a language for the elite. And while the elite crashes the system and lose millions in 30 minutes, us dumbasses in Java can build and release with good tools without using bin patches that remove critical features :)

You'll see when you start working. Every company is a shitshow, better be in a Java shitshow with slow idiots than in a C++ shitshow with autist geniuses :D

You don't have to pay a license, but it's starting to get blurry. My giant company is phasing out Oracle's JVM and moving to OpenJDK, so there's that...

Re: Java 16

#118

Earlier quoted context omitted.

FWIW, I feel that way about Scala, but not F#. The only big F# feature I know of that's fallen out of favor is type providers, and, IMO, that's not because the feature was half-baked so much as because it was one of the many casualties of .NET's transition to being a truly cross-platform toolkit.

Because Scala is a truly innovative and experimental language that came out of a programming language research group. That's why there's a lot of features that didn't play out well in real-world. F# started out as .NET rendition of OCaml. Most languages initiated by large crops don't try to be innovative, rather they take approaches introduced by different niche languages (many of them are only for research purpose)…

F#'s relationship has been vastly overblown. The truth is that they're about as closely related as C# and Objective-C. In the same way that the overlap between C# and ObjC is basically just the C bit, the overlap between F# and and OCaml is basically just the ML bit. (Actually, even less than that.) You could say that it was inspired by OCaml, but it includes almost none of what makes OCaml OCaml, and adds a lot of its own new ideas.

Re: Java 16

#119
post #27
post #12

Very cool to see that Scala continues to have a huge impact on Java’s roadmap. Records and Sealed Classes are borrowed from Scala. Could be not the best news for new Scala adoption, but good news for developers having better abstractions in Java Edit: Kotlin, and other languages should also mentioned since they also include similar features. I still think Scala has had the most influence over the years.

We see similar developments with C# borrowing features from F#, with records in v9, pattern matching, etc. While it's good for C#/Java, it does make it harder to push for adoption for a language such as Scala and F#. Why bother investing in the languages with a much smaller market share when the big boys adopt good bits and pieces from them constantly?

>Why bother investing in the languages with a much smaller market share when the big boys adopt good bits and pieces from them constantly?

because if you know exactly what you want to do there's no reason to settle for the second best thing. If you want F#, no harm with going exactly with F#.

I talked to a bunch of Jane Street engineers once and the consensus seemed to be that Ocaml, despite its very small footprint, actually helped them attract the kind of people who were super enthusiastic about building really good stuff with a good technology, so it actually made recruiting for them easier.

Re: Java 16

#120

Lots of shiny new toys to play with :) I like playing with new features and pushing to silly limits. Here's some fun things you can do now: Compiletime checked state machines with Sealed Classes [preview feature] https://benjiweber.co.uk/blog/2020/10/03/sealed-java-state-m... Autobuilders, Mixins, Conversions & more with Records https://benjiweber.co.uk/blog/2020/09/19/fun-with-java-recor... Pattern Matching fun http…

If you enjoy pattern matching in Java, I would recommend checking out the latest & greatest that C# has to offer as a comparison: https://docs.microsoft.com/en-us/dotnet/csharp/pattern-match... Being able to combine pattern matching with switch expressions has allowed us to construct extraordinarily concise state machines for our UIs.

I used Java a lot and like some aspects. But I think C# is way ahead in some important ways and Java is playing catch-up
Post reply on HN