Live data from Hacker News

New language features since Java 8 to 17

advancedweb.hu

161–170 of 358 posts

Re: New language features since Java 8 to 17

#161

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,…

Great (unintended) straw-man comment. These are all minor reasons in the context of an introduction to developing software. Yes, there's some initial setup, but once that's done and you're learning how programs are constructed with classes, objects, methods and where static typing can help you, they're all the important things that will carry you well into a career.

Re: New language features since Java 8 to 17

#162
post #141

Earlier quoted context omitted.

> E.g., correct usage of arrays vs. ArrayList. Arrays vs lists is a thing in all languages, not Java. They just have different names (list, vector, sequence...)

I don’t think Ruby or Python have linked lists, only arrays.

ArrayList is not a linked list, it's an array-backed list like List in C# or other languages, like the name implies. Linked list is `java.util.LinkedList`.

Re: New language features since Java 8 to 17

#163

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.

If Kotlin is unreadable without an IDE, it's Kotlin done badly. You can misuse its features to obfuscate the code, but in and of itself it's an extremely clear language.

Re: New language features since Java 8 to 17

#164

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)

Counterpoint: it's become a fairly multi-paradigm language at this point, and a multi-paradigm language is exactly what should be the defacto language in curriculums Whether or not Java is the best one for this purpose is up for debate, but I think it's no longer a bad one

> Counterpoint: it's become a fairly multi-paradigm language at this point, and a multi-paradigm language is exactly what should be the defacto language in curriculums

I'm surprised you would say this, as it is the exact opposite of my experience as university teacher. I think we should teach concepts, and concepts appear much more crisply in small and focused languages. I think students gain more from being exposed to specialised languages than to more muddled multi-paradigm languages. For example, functional programming is much clearer in a language such as SML or Haskell than in Scala or F# (although the latter isn't that bad), because you can actually teach the whole language without any part of it muddling the concepts. Similarly, I would rather teach object-oriented design and implementation with, say, Smalltalk than OCaml.

Now, industrial usage is a different matter - here I have no problem with multi-paradigm languages.

Re: New language features since Java 8 to 17

#165
post #141

Earlier quoted context omitted.

> E.g., correct usage of arrays vs. ArrayList. Arrays vs lists is a thing in all languages, not Java. They just have different names (list, vector, sequence...)

I don’t think Ruby or Python have linked lists, only arrays.

Ruby and python only have an equivalent to Java’s “array list.” It’s not in the standard library, but you can trivially make linked list nodes yourself if the problem calls for it; I don’t remember encountering a need for the data structure over the built in array-list type outside of interview questions anyways.

Re: New language features since Java 8 to 17

#166

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.

> Languages should be dumb. Standard libraries should be smart. Not the other way around.

This is a strong argument for Clojure. The language makes helpful and readable guarantees about data shape, and provides a wealth of functions that operate on its core data structures.

Kotlin has a bunch of inferred classes, and Java has a bunch of explicit ones. Clojure recognizes that data does not look like either of those: it’s fundamentally a sequential list of things or a key/value map of things. Everything else is a special case that only your program cares about, and it gives you the tools to build a system to work with them as generally or specifically as you need it to.

Re: New language features since Java 8 to 17

#167
post #127

Earlier quoted context omitted.

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.

> Kotlin libraries on the JVM cannot take advantage of JVM ecosystem

This makes literally no sense since Android apps are built using not just Gradle but actually the entire Maven Central repo that all Java apps use.

Without any changes.

If what you said was remotely close to accurate, Android would have its own Maven Central repo.

Re: New language features since Java 8 to 17

#168
post #163

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.

If Kotlin is unreadable without an IDE, it's Kotlin done badly. You can misuse its features to obfuscate the code, but in and of itself it's an extremely clear language.

Kotlin relies on the developer to write readable code, and just generally offers way too many ways of doing the same thing. Too much freedom of expression. Java, by virtue of being more verbose, requires writing everything out explicitly, so you really have to expend some extra effort to make your code unreadable.

Re: New language features since Java 8 to 17

#169

Earlier quoted context omitted.

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,…

Great (unintended) straw-man comment. These are all minor reasons in the context of an introduction to developing software. Yes, there's some initial setup, but once that's done and you're learning how programs are constructed with classes, objects, methods and where static typing can help you, they're all the important things that will carry you well into a career.

Just because you can have a career in Java despite the disadvantages does not mean that they're not disadvantages that most other languages don't have.

Re: New language features since Java 8 to 17

#170

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 utility of a language as a tool of thought increases with the range of topics it can treat, but decreases with the amount of vocabulary and the complexity of grammatical rules which the user must keep in mind. Economy of notation is therefore important." - Notation as a Tool of Thought by Kenneth Iverson
Post reply on HN