Live data from Hacker News

New language features since Java 8 to 17

advancedweb.hu

131–140 of 358 posts

Re: New language features since Java 8 to 17

#131

Earlier quoted context omitted.

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.

But reading terse code requires a lot more prior knowledge, which you might not have. You learn to recognize patterns in the boilerplate and just glance over it, taking no additional time.

Re: New language features since Java 8 to 17

#132

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)

Could you please support your statement with reasons?

Not sure about the person above but the following are my opinion on why I don't like Java:

1. no unsigned integers

2. no freestanding functions

3. pom files are a huge pain

4. the com.blah.blah.blah ridiculously long package path precedent makes it awful to work with if you don't have an ide

5. you can't actually use javac to compile your code. everything is so big and complicated you have to use ant, gradle, maven, etc.

6. too much boilerplate. "public static void main" etc.

There's a few more, but they'd take more than a sentence to explain.

Re: New language features since Java 8 to 17

#133
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.

thats the status quo fallacy.

You can get work in those other languages, nor is an understanding of Java a prerequisite for understanding how to use those other langs, etc.

Re: New language features since Java 8 to 17

#134

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)

Java sucking could be a good reason to teach it, no? It's instructive to know what bad choices have been made. Much like your first job, it can be unfortunate to work in a place where everything functions properly, because you won't know what makes it work.

Java is also a good base for looking at other JVM languages, and for looking at the JVM itself. That's gotta be part of a good curriculum too, doesn't it?

Re: New language features since Java 8 to 17

#135

Earlier quoted context omitted.

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.

But reading terse code requires a lot more prior knowledge, which you might not have. You learn to recognize patterns in the boilerplate and just glance over it, taking no additional time.

garbage collected programming languages are for people, not computers.

Kotlin isn't terse.

Re: New language features since Java 8 to 17

#136

Earlier quoted context omitted.

Scala is fine. People understood it's not really worth it as a "better Java". Companies that choose Scala in 2021 are using either big data frameworks (where Python bindings are the most common alternative to Scala, not Java), or functional ecosystems (Typelevel, Zio). Scala 3 has taken an interesting direction and to me it seems that Odersky wants to win Python developers over rather than Java shops using Spring. Ne…

Interestingly, I have the exact opposite opinion. Scala has been declining steadily for a decade now, and Scala 3 is going to precipitate this state of affairs by splitting the shrinking community even further. Kotlin, on the other hand, has done nothing but grow for the past five years, no doubt helped by Google's formidable support for it. I just took a quick look at one of its Slack channels, "getting-started", an…

It's not in decline imho, it has settled as middle ranking language in terms of popularity and is v popular in its niche. It depends where you are of course but in London it's used in loads of places from major corporations to startups. The market is hot.

Re: New language features since Java 8 to 17

#137

Earlier quoted context omitted.

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.

But reading terse code requires a lot more prior knowledge, which you might not have. You learn to recognize patterns in the boilerplate and just glance over it, taking no additional time.

It definitely does not take “no” additional time to read verbose boilerplate code.

As for prior knowledge, that argument doesn’t fly. A lot of the verboseness of Java could be addressed VERY easily with clear syntax that doesn’t require a lot more prior knowledge. An example is getters and setters, which are very easy to understand in languages that have built-in support for concise syntax but Java has somehow ignored the advantage of concise syntax for 25 years.

Besides, if your argument is that Java doesn’t require “prior knowledge,” I beg to differ. E.g., correct usage of arrays vs. ArrayList.

Re: New language features since Java 8 to 17

#138

Earlier quoted context omitted.

Most likely to Flutter. When Google will be ready to ditch Android API.

Android is based on the JVM, it will never switch to Flutter (and an aggravating factor is that Dart is an inferior version of Kotlin).

The JVM is specifically the part of Java Android didn't use, and the layer Google has already completely replaced once.

Re: New language features since Java 8 to 17

#139

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.

The tradeoff space you’re describing doesn’t reflect reality. Adding more brackets and pointless keywords to a language doesn’t meaningfully improve the programmer experience in any way. There are plenty of terse languages that don’t require an IDE to understand. If anything, Java effectively requires an IDE to use because it’s so verbose.

The things that I write in a computer program’s code should correspond as closely as possible to what the program means - nothing more and nothing less. Java is terrible at this.

Re: New language features since Java 8 to 17

#140

Earlier quoted context omitted.

Could you please support your statement with reasons?

Not sure about the person above but the following are my opinion on why I don't like Java: 1. no unsigned integers 2. no freestanding functions 3. pom files are a huge pain 4. the com.blah.blah.blah ridiculously long package path precedent makes it awful to work with if you don't have an ide 5. you can't actually use javac to compile your code. everything is so big and complicated you have to use ant, gradle, maven,…

>no unsigned integers

technically, char is unsigned. For practical purposes use ByteBuffer.

>no freestanding functions

you can "import static" all the static functions you want; it's not any different than C, where you need to include the headers.

> pom files are a huge pain

That has nothing to do w/ java, itself, like at all.

>you can't actually use javac to compile your code. everything is so big and complicated you have to use ant, gradle, maven, etc.

If you use ant, how did you get to use pom? That's pretty much saying that using 'make' is terrible. For personal projects that involve no web, I don't quite need anything else but the JDK, itself. In that case, it's totally doable to call javac form the command line.

Post reply on HN