Live data from Hacker News

Java 26 is here

hanno.codes

11–20 of 352 posts

Re: Java 26 is here

#11
post #9
post #3

Earlier quoted context omitted.

Google basically played a J++ with Android Java, with Kotlin as their .NET/C#. At least they are forced to partially update Android Java, now Java 17 subset, so that Kotlin can keep up with was is mostly deployed at Maven Central.

Pretty sure they did a J# ;). But I agree that Kotlin is their C#. The JDK and JVM has advanced so fast while android has been lagging. It's pretty frustrating, especially because google has been so slow to pull in changes from later java versions. A part of me wishes that android would just dump their hokey dalvik, ART, and other BS and just use the OpenJDK or a fork of the OpenJDK with whatever special sauce they n…

Do you think it's legal reasons, technical reasons, NIH syndrome, or some other reason why Android doesn't use OpenJDK?

Re: Java 26 is here

#12
post #7
post #4

I was pretty surprised when I learned recently that the Java alternative for green threads doesn't use colored functions. It put Java in a higher place in my perception.

What are colored functions?

https://journal.stuffwithstuff.com/2015/02/01/what-color-is-...

The terminology is used to talk about languages that have async and sync functions where you declare (or color) the function as either async or sync.

In these languages it's pretty common for the language to enforce a constraint that async functions can only call other async functions. Javascript / Typescript, Python are popular examples of languages with colored functions.

Re: Java 26 is here

#13
post #7
post #4

I was pretty surprised when I learned recently that the Java alternative for green threads doesn't use colored functions. It put Java in a higher place in my perception.

What are colored functions?

Any time you have a barrier between one function being able to call another. The original article on this called them red functions and green functions. A green function can call a red function but a red function can't call a green function.

In terms of async, it's when you have to have a function with "async" attached to it and making it so that only other async functions can call async functions.

It ends up creating a weird circumstance where you can end up with a lot of duplicated APIs, particularly in libraries, because you are providing both async and non-async versions of functions.

Re: Java 26 is here

#14
post #9

Earlier quoted context omitted.

Pretty sure they did a J# ;). But I agree that Kotlin is their C#. The JDK and JVM has advanced so fast while android has been lagging. It's pretty frustrating, especially because google has been so slow to pull in changes from later java versions. A part of me wishes that android would just dump their hokey dalvik, ART, and other BS and just use the OpenJDK or a fork of the OpenJDK with whatever special sauce they n…

Do you think it's legal reasons, technical reasons, NIH syndrome, or some other reason why Android doesn't use OpenJDK?

A little bit of all of the above.

Android's usage of Java started right as Sun was being acquired by oracle and right before the jdk was GPLed.

... And I'll be. Apparently Android is using the OpenJDK since Android 7. [1]

[1] https://en.wikipedia.org/wiki/Android_Nougat

Re: Java 26 is here

#15
post #7
post #4

I was pretty surprised when I learned recently that the Java alternative for green threads doesn't use colored functions. It put Java in a higher place in my perception.

What are colored functions?

The term comes from an old blog post [0] about different kinds of effect systems. Every function has a color, and every colored function can only call functions that are compatible with it, usually of the same color. The net result is that you end up either duplicating a lot of your common code so you have compatible interfaces for all the different colors (let's call that "separate but equal" if we're feeling spicy), or you end up shoving round pegs into the square holes of your dominant function color.

[0] https://journal.stuffwithstuff.com/2015/02/01/what-color-is-...

Re: Java 26 is here

#16
post #9
post #3

Earlier quoted context omitted.

Google basically played a J++ with Android Java, with Kotlin as their .NET/C#. At least they are forced to partially update Android Java, now Java 17 subset, so that Kotlin can keep up with was is mostly deployed at Maven Central.

Pretty sure they did a J# ;). But I agree that Kotlin is their C#. The JDK and JVM has advanced so fast while android has been lagging. It's pretty frustrating, especially because google has been so slow to pull in changes from later java versions. A part of me wishes that android would just dump their hokey dalvik, ART, and other BS and just use the OpenJDK or a fork of the OpenJDK with whatever special sauce they n…

J++ predates C#. It was Microsoft's version of Java that wasn't quite compatible.

Re: Java 26 is here

#17

JEP 504: Remove the Applet API Glad to see this being removed. Java plugins especially on Linux were awful and required by tons of corporate stuff. Anyone remeber IcedTea Web? A functional and opensource Java plugin and Java Webstart implementation?

Remember IcedTea Web? Oh boy, I still have environments that use it.

Re: Java 26 is here

#20
post #3

Android as always in shambles. Shame that neither Google, nor ecosystem cares about Java because they’ve bought JetBrains kopium.

Google basically played a J++ with Android Java, with Kotlin as their .NET/C#. At least they are forced to partially update Android Java, now Java 17 subset, so that Kotlin can keep up with was is mostly deployed at Maven Central.

> Google basically played a J++ with Android Java

No, they didn't. Google happily used regular Java until Oracle played Oracle. Then Google stopped updating the supported Java language version and started diversifying away from Java.

Post reply on HN