Live data from Hacker News

New language features since Java 8 to 17

advancedweb.hu

121–130 of 358 posts

Re: New language features since Java 8 to 17

#121

Earlier quoted context omitted.

I agree with everything here except the "should stop being taught as the defacto language in computer science curriculums". Realitically, a CS curriculum needs to at least vaguely prep a student for life in the industry, and Java is not only massively popular, but is also a great way of showing how OO is used in practice i.e. kinda badly. No point teaching everyone about beautifully architected Smalltalk programs jus…

teach javascript, ruby, rust, go, kotlin....scheme. literally anything else.

Apart from Javascript. Ruby, Rust, Go, Kotlin and Scheme combined wouldn't equal to half the market Java has to offer.

Re: New language features since Java 8 to 17

#122
post #45

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.

Yeah I think most Java devs are a bit in awe of Clojure, just not sure about the leap needed to get there.

Anyone who values static typing will never be in awe of Clojure. Or any dynamically typed language, for that matter.

And Java developers care a lot about static typing.

Re: New language features since Java 8 to 17

#123
post #94
post #26

Most of which unavailable on Android Java flavour, sorry Google's J++.

Is there a reason for that? I'd really love to get into android development, but I'm loathe to give up some of the nicer language features in Java. What version of Java is android supporting? At least 8, right?

Many got sold on the idea that they adopted OpenJDK, but that is quite far from the truth, so in reality they cherry pick the features and standard library classes/methods that are somehow relevant to port key Java libraries into Android.

Currently they support a Java 11 subset.

You can track them on AOSP Gerrit commits.

Apparently starting with Android 12 , ART can be updated via Play Store and they should provide better updates.

Although there is also the question how they were naive to think Java would never require updates, or possibly related to the Oracle dispute, which anyway proves the point that they behave just like Microsoft did with J++.

Re: New language features since Java 8 to 17

#124

Java sucks, and should stop being taught as the defacto language in computer science curriculums. It's extremely busy and verbose. There are better OO languages out there, if the point is to teach OO. (I'm ready for this post to get downvoted into oblivion)

Being verbose is a plus. I really really really hate the terseness of Kotlin and how it's basically unreadable without an IDE. Languages should be dumb. Standard libraries should be smart. Not the other way around. The number of syntax constructs that generate standard library calls when compiled should be minimized as much as possible. Edit: one more thing, operator overloading is extremely harmful for readability.

Being verbose is one of the biggest negatives a programming language can have. When you’re working on a team with other programmers and reading someone else’s code, verbose code takes much longer to read and grok because you have more boilerplate code to read.

Re: New language features since Java 8 to 17

#125
post #89

Earlier quoted context omitted.

How does this feel with Python being dynamic? I always felt very uneasy writing Python precisely because if some random module became incompatible, especially via a transitive depndency, I might not find out until it was running in production.

What's to be uneasy about? Lock your environments, pin your dependencies, especially in production.

Until your LTS OS gets to end of life and you need to switch to the next one which conveniently deprecates old python versions so you have to rewrite everything.

Re: New language features since Java 8 to 17

#126
post #90
post #61

Earlier quoted context omitted.

I hear this a lot about Scala, and I am a Scala dev so maybe I'm biased, but I don't get the difficulty angle particularly. I'm in no way exceptional as a programmer or IQ-wise but I picked up Scala easily as part of my first job. The difficulty thing doesn't compute to me but it could just be that I'm well-suited to the language. It works beautifully as a better Java if that's how you wish to use it. Granted, it mig…

It's difficult because the language is gigantic compared to Java, it has all the OOP bits Java has (and Scala needs in order to be relevant) then a whole bunch of FP stuff on top. This is a lot for newer programmers and while they might be able to do "hello world" equally quickly I do feel like they soon hit a wall of "I don't understand why this works" when looking at idiomatic Scala. It can be used as a better Java…

It does require discipline, or at least one person on the team who can set a style guide for the newcomers to follow, this is true.

Re: New language features since Java 8 to 17

#127
post #94

Earlier quoted context omitted.

Is there a reason for that? I'd really love to get into android development, but I'm loathe to give up some of the nicer language features in Java. What version of Java is android supporting? At least 8, right?

Java's supported version on Android is a moot point: all new Android development should be made in Kotlin.

Pity that Kotlin builds on Java ecosystem and uses that as selling point for adoption.

Kotlin libraries on the JVM cannot take advantage of JVM ecosystem, and require KMM to be portable across runtimes, or be constrained to the Android Java flavour.

It is like having a flavour of Typescript that only works on Edge.

Re: New language features since Java 8 to 17

#128

Earlier quoted context omitted.

Global scope is a terrible invention. The less implicitness there is, the better.

then write assembly.

What I'm trying to say that at some point in piling up abstraction layers, abstractions stop being helpful and start getting in the way.

Re: New language features since Java 8 to 17

#129
post #90
post #61

Earlier quoted context omitted.

I hear this a lot about Scala, and I am a Scala dev so maybe I'm biased, but I don't get the difficulty angle particularly. I'm in no way exceptional as a programmer or IQ-wise but I picked up Scala easily as part of my first job. The difficulty thing doesn't compute to me but it could just be that I'm well-suited to the language. It works beautifully as a better Java if that's how you wish to use it. Granted, it mig…

It's difficult because the language is gigantic compared to Java, it has all the OOP bits Java has (and Scala needs in order to be relevant) then a whole bunch of FP stuff on top. This is a lot for newer programmers and while they might be able to do "hello world" equally quickly I do feel like they soon hit a wall of "I don't understand why this works" when looking at idiomatic Scala. It can be used as a better Java…

Scala 3 somewhat simplies implicits by the way. Especially w.r.t to extension methods, which are now a first class construct in the language: https://docs.scala-lang.org/scala3/reference/contextual/exte...

Re: New language features since Java 8 to 17

#130
post #121

Earlier quoted context omitted.

teach javascript, ruby, rust, go, kotlin....scheme. literally anything else.

Apart from Javascript. Ruby, Rust, Go, Kotlin and Scheme combined wouldn't equal to half the market Java has to offer.

university is not meant to teach what the market is offering, rather hopefully shape and dictate it
Post reply on HN