Hacker News new | ask | show | jobs
Java is too old, What should you learn in 2018? (hackernoon.com)
16 points by erajasekar 2958 days ago
8 comments

While there are many great reasons to learn languages like Scala and Kotlin, "Java is old" is not the right one (for one, it's false).

The functional programming elements in Java 8 (<4 years old) do make it a new language. I've been keeping up with Java since V1.4, and I felt like Java 5 was the update that made Java a modern language, but Java 8 brought a paradigm shift (if you felt like changing your style).

And in any way, the title is misleading. It should have been "Kotlin: here is why we think it's better than Java 5" - because that's the actual content of the article.

I like learning about new languages, but I wish the article had more. For instance, it doesn't mention functional programming paradigms (the new thing in Java 8), even though Kotlin does have them, e.g.[1]. That's one way to improve the article beyond the title.

[1] https://medium.freecodecamp.org/my-favorite-examples-of-func...

Right, the same goes for C#. And even ignoring all the new (functional) elements it's still really dumb to say that you shouldn't learn something because it's "old".

By the time half of the current crop of new languages have died Java and C# will still be in use at large scale.

With a title like that, the article should explore many new languages out there and what they offer a programmer.

Instead, this article just answers its question with one word: Kotlin.

I get it; Kotlin is easier to write in than Java. But the article should list why it's better than Scala or Clojure, if we're restricting ourselves to JVM languages. (And why should we?)

There's 48 languages more common than Kotlin, according to https://www.tiobe.com/tiobe-index/ . Why is it better than all of them?

By restricting ourselves to the JVM, we can introduce Kotlin code gradually because it can run side-by-side with legacy Java code. Unlike the other JVM languages, Kotlin has been designed to work seamlessly with an IDE. It doesn't introduce as much extra symbol syntax as Scala so it's still readable. And it was designed to be statically-compiled from the ground up, unlike Clojure and Apache Groovy which both bolted on clumsy-looking static-typing annotations later on.
> Unlike the other JVM languages, Kotlin has been designed to work seamlessly with an IDE.

Specifically, one IDE: Intellij.

Outside that one case, support is just as good/bad as Scala.

> There's 48 languages more common than Kotlin, according to https://www.tiobe.com/tiobe-index/ . Why is it better than all of them?

Funny you should say that:

TIOBE Index for May 2018

May Headline: Scala cracks top 20

TIL that Ada is more popular than Kotlin.
This article pretends that libraries such as Spring, Lombok, Guava and maven/gradle don't exist. It would be like saying Javascript is useless because the features that Angular/React/Vue provide aren't provided in the core syntax.

There are good reasons to move into something like Kotlin but the author has barely touched on any of them. "Java is old" also makes the author sound like they ditch programming languages that aren't currently trending on Twitter or something.

I wish that there was a way to remove from hn author posts with obvious clickbait/incendiary titles like this.

I don't care to see any posts ever again from this author.

HN desperately needs filters. There are specific topics (like Facebook) that I have no interest in seeing. Filtering out specific users would be great too.
Maybe we could make a plugin? I don't care at all about discussions (and usually can't stand the comments on) bitcoin, the Bay Area housing disaster, C, etc.

It can't be that hard, the CSS selectors for posts are really simple.

https://www.pluralsight.com/tech-index

Java might be old, but it's still a long way from dead. And actually it could be argued that it's done a fantastic job keeping up with the demands of modern development. Kotlin and Scala are great, but there's still tons of need for and value in Java itself.

Java has changed a lot over the years, for example generics, lambdas, default methods, type inference, and new things are in the pipeline, for example value types, data classes, and pattern matching.

The JDK libraries has also grown. You could probably spend a week just learning about java.util.concurrent.* and how to write efficient multithreaded code.

How to separate two independent clauses with a period, especially when the second one is already capitalized.
Kotlin is just Java with some really _nice_ syntactic sugar. It transpiles 1:1 to Java so you are going to need to know Java anyways.
Kotlin also compiles to pure JavaScript.

Does this mean that Kotlin is JavaScript with some really _nice_ syntactic sugar?