Live data from Hacker News

New language features since Java 8 to 17

advancedweb.hu

31–40 of 358 posts

Re: New language features since Java 8 to 17

#31
post #28

Whenever we read about new improvement in Java,it is always inevitably followed by concerns for viability of Kotlin or Scala. However these concerns are never applicable for Closure. I am glad I went all in on Clojure.

Can you explain that for the Java noobs here, like me?

Scala and Kotlin tried to be a better Java (i.e. Algol-esque syntax). Clojure tries to be a better Lisp, an entirely different family of language.

Though a good flamewar can be had on 1) Is Scala closer to Pascal 2) Is Pascal Algol-descendant

Re: New language features since Java 8 to 17

#32

I've been bitten by bitwise operations on signed integers a few too many times. Are there any plans on having normal unsigned integer types yet?

Java already has everything you need for unsigned integers doesn't it? You just use the normal int type, and then use methods like Integer#compareUnsigned instead of language operators.

This reads like, "VisualBasic already has everything you need for pointers. You can define your own classes and pass by reference."

Re: New language features since Java 8 to 17

#34

Earlier quoted context omitted.

Java already has everything you need for unsigned integers doesn't it? You just use the normal int type, and then use methods like Integer#compareUnsigned instead of language operators.

This reads like, "VisualBasic already has everything you need for pointers. You can define your own classes and pass by reference."

Not sure what you mean, sorry?

Are you just objecting to the verbosity of method calls over operators? Yes it's a bit annoying, but the functionality is all there.

Re: New language features since Java 8 to 17

#35
post #31
post #28

Earlier quoted context omitted.

Can you explain that for the Java noobs here, like me?

Scala and Kotlin tried to be a better Java (i.e. Algol-esque syntax). Clojure tries to be a better Lisp, an entirely different family of language. Though a good flamewar can be had on 1) Is Scala closer to Pascal 2) Is Pascal Algol-descendant

Clojure tries to be an immutable-data, copy-on-write, threadsafe by default dialect of Lisp, which none of the other Lisps do.

Re: New language features since Java 8 to 17

#36
post #9
post #2

Unfortunately it looks like Java is going to evolve enough to take the wind out of the sails of Kotlin and Scala for most dev shops. I guess the positive take is that those improvements might not have happened without the efforts to develop better JVM languages.

This is great not unfortunate. If Java improves because of Scala and Kotlin then so much the better, this is how languages evolve. If it really does evolve to remove the need for a better Java then it would be nice if people switched away from Kotlin and back to it. Scala can then carry on cementing its niche as a powerful commercial FP language. No hate for Kotlin at all but it seems like in that world, there might…

Android will always be Kotlin-first. That's a pretty huge market.

Re: New language features since Java 8 to 17

#37
post #9
post #2

Unfortunately it looks like Java is going to evolve enough to take the wind out of the sails of Kotlin and Scala for most dev shops. I guess the positive take is that those improvements might not have happened without the efforts to develop better JVM languages.

This is great not unfortunate. If Java improves because of Scala and Kotlin then so much the better, this is how languages evolve. If it really does evolve to remove the need for a better Java then it would be nice if people switched away from Kotlin and back to it. Scala can then carry on cementing its niche as a powerful commercial FP language. No hate for Kotlin at all but it seems like in that world, there might…

To be honest I see Kotlin continuing to exist because of it's multi-platform nature and it's focus being on different things to Java.

So even if feature wise the 2 equalize (a good thing not a bad thing IMO) stylistic differences will remain. Many of Kotlins syntactic differences are unlikely to make it to Java for instance.

I'm ok with this. I use both for different things. Kotlin for most app level development, Kotlin for libraries that are only useful in the context of Kotlin, Java for everything else so it has minimal dependencies and can be used from Kotlin/Scala/Java/Clojure equally well.

Re: New language features since Java 8 to 17

#38
post #36
post #9

Earlier quoted context omitted.

This is great not unfortunate. If Java improves because of Scala and Kotlin then so much the better, this is how languages evolve. If it really does evolve to remove the need for a better Java then it would be nice if people switched away from Kotlin and back to it. Scala can then carry on cementing its niche as a powerful commercial FP language. No hate for Kotlin at all but it seems like in that world, there might…

Android will always be Kotlin-first. That's a pretty huge market.

I think people underestimate how deep this integration is going. Compose relies on extensions to the Kotlin compiler. The future of Android and Kotlin are pretty much tied together at this point.

Re: New language features since Java 8 to 17

#39

I've been bitten by bitwise operations on signed integers a few too many times. Are there any plans on having normal unsigned integer types yet?

What exactly do you have in mind. Using '&0xff' is annoying but well whatever. Perhaps 23y ago, applying the bitwise and would be a novelty but now it's a minor inconvenience.

The way java is built in internally I can quite see another primitive type popping up.

Post reply on HN