Live data from Hacker News

Java 12

jdk.java.net

441–450 of 478 posts

Re: Java 12

#441

Earlier quoted context omitted.

I've done this a few times. Most are due to reflection limitations with the newodule system. They can be worked around by adding exceptions to removal of reflection metadata largely. Kinda a PITA but not too hard. Active libraries have pretty good Java 11 support these days though. It's really improved a lot on the past year or two

> Active libraries So my upgrade is going to be tremendously hard for this application, then. Good to know

Haha yeah it might be a PITA. Unless your app is huge it shouldn't take more than a couple days though.

Basically a compile run fix reflection loop until you stop getting errors :'(

Re: Java 12

#442
post #430

Earlier quoted context omitted.

Only tangentially related to your comment, Fortnite is based on UE4 so it does use garbage collection. And it has caused framerate/hitching issues as recently as a year ago according to an Epic developer. https://www.reddit.com/r/FortNiteBR/comments/7gu8aq/hitching...

I didn't realize UE4 adds a garbage collector on to C++. Interesting.

Yes. UE4 also extends C++ with its own reflection system as well which is used all over the place, and critical to the garbage collector.

https://wiki.unrealengine.com/Garbage_Collection_Overview

Re: Java 12

#443

Earlier quoted context omitted.

Maven is an incredible system. It can do so much and yet, even though I've setup countless apps and services, I can never use it without looking literally everything up. Maven and spring are the worst parts, for me, when dealing with Java. I don't mind the language at all.

What was your problem specifically ? For me these two worked great together actually. I really loved Spring. Maybe the problem has some overlooked fix that I can help with ?

Nothing in particular just lots of seemingly random issues trying and failing to get them working correctly, likely due to my lack of knowledge but every time I try to better learn them my brain just can't handle it.

I don't know what it is. I think part of it is my auto-cringe when I see XML nowadays.

Re: Java 12

#444

Earlier quoted context omitted.

just had this conversation with a co-worker today. java is a stable api but it also doesn't evolve. The tradeoff is you get a program guaranteed to work no matter the upgrade vs being able to build better toolage. React changes every year or 2. It is exhausting. But you get way better patterns and some things that drastically improve productivity.

I've been working professionally in Java for almost 20 years. I can't remember the last time I saw someone use features introduced after 1.6. The time API in 1.8 was nice. I've never seen anyone use lambdas in production code. I'm sure people do use newer stuff, but I think it's the minority. So in practice it's even more stable than it is in the headlines.

Last time I used java, I used it extensivelly lambda, collection map and flatmap, optinnals... But old school javaist barely used them though.

Re: Java 12

#445
post #420

Earlier quoted context omitted.

> What tooling? Being forced to use InteliJ, without any proper support on Eclipse and Netbeans? Seeing that both Eclipse and Netbeans are now more or less dead (and speaking as a long time Eclipse user, from the very first version to around 4), yes, first class vendor-direct InteliJ support is more than enough. And more than most languages (including Groovy) ever had. > As for Kotlin/Native, there is nothing to worr…

Fuchsia is language agnostic. This is a boon. Writing for Fuchsia isn’t like writing for Unix where C is king. Fuchsia is able to natively host many more ecosystems than Linux cares to bother with. It gives me great confidence.

Windows has been language agnostic for decades.

What's so remarkable about that fact?

Re: Java 12

#446
post #365

Earlier quoted context omitted.

If it lives up to claims surely it’s a paid for add on?

Originally it was intended as a commercial feature, but since JDK 11 Oracle open sourced all previously-commercial features in the JDK, and now it's part of OpenJDK. It's already available in JDK 11 and 12.

I never got to the level where I needed anything more than the stock default GC. But this looks compelling. Does Kotlin and other JVM based languages benefit from it, too?

Re: Java 12

#447

Earlier quoted context omitted.

"the code is quite good to analyze, extend or replace" But how do you even know what code to read when so much of the program's logic is in annotations and other kinds of action at a distance?

Exactly. For example, if you're (still) using Spring MVC, what gets called in your backend on a given action attribute in your JSP or Thymeleaf or whatever template, is expressed through your method signature and lots of annotations where the order of arguments matter eg. some magic attributes must come right after others. All you see in your debugger, though, is that your request hangs in some nested and chained han…

Another related surprising thing (as I'm currently learning Spring/Hibernate/etc.) is what happens when the Hibernate Validator library is missing at runtime:

Nothing.

All the carefully crafted validation annotations just don't do anything, no validation is performed, and there is no indication whatsoever of this.

Re: Java 12

#448
post #420

Earlier quoted context omitted.

> What tooling? Being forced to use InteliJ, without any proper support on Eclipse and Netbeans? Seeing that both Eclipse and Netbeans are now more or less dead (and speaking as a long time Eclipse user, from the very first version to around 4), yes, first class vendor-direct InteliJ support is more than enough. And more than most languages (including Groovy) ever had. > As for Kotlin/Native, there is nothing to worr…

Fuchsia is language agnostic. This is a boon. Writing for Fuchsia isn’t like writing for Unix where C is king. Fuchsia is able to natively host many more ecosystems than Linux cares to bother with. It gives me great confidence.

Tons of great stuff for Unix is written in C++ and other languages all the way to Python and Java. You can write Unix apps in whatever language you want. Ditto for Windows and MacOS.

Not sure what the special deal is with Fuchsia here.

Perhaps you think you'll be able to write Fucshia device drivers with any language you like? That wont be the case at all.

Also Linux has this going in its favor over Fucshia: it actually exists.

Re: Java 12

#449

Earlier quoted context omitted.

just had this conversation with a co-worker today. java is a stable api but it also doesn't evolve. The tradeoff is you get a program guaranteed to work no matter the upgrade vs being able to build better toolage. React changes every year or 2. It is exhausting. But you get way better patterns and some things that drastically improve productivity.

> java is a stable api but it also doesn't evolve You have probably missed the last 5 years. From streams, to closures, to default methods, to functional interfaces, to local type inference, to new Process APIs, to modules, to unsigned arithmetic, to new date/time APIs, http client, 2 new GCs, shell REPL, etc... with more to come, and new releases every 3 months...

> unsigned arithmetic

I thought I had missed something there, but it looks like it's just a bunch of utility methods to reinterpret integers and convert them to longs (etc.)?

Kotlin, on the other hand, recently added actual unsigned types[0] – taking up the same number of bits as the corresponding signed type, supporting the normal mathematical operators, and preventing unintended mixups with signed types.

[0] https://kotlinlang.org/docs/reference/basic-types.html#unsig...

Re: Java 12

#450
post #365

Earlier quoted context omitted.

Originally it was intended as a commercial feature, but since JDK 11 Oracle open sourced all previously-commercial features in the JDK, and now it's part of OpenJDK. It's already available in JDK 11 and 12.

I never got to the level where I needed anything more than the stock default GC. But this looks compelling. Does Kotlin and other JVM based languages benefit from it, too?

Sure. All languages that run on the Java platform[1] can benefit from it, and from most other Java platform enhancements.

[1]: I prefer saying Java platform rather than JVM, because a program written in Kotlin shares over 90% of its infrastructure code with a program written in Java (not including the OS), and the JVM constitutes only about 20% of that.

Post reply on HN