News for hackers. Stuff that matters.
Re:Kotlin becomes second most popular language on the JVM by gambler on Thursday February 06, 2020 @11:27AM (#22257362)
>Modern Java is actually quite good.

Lambdas can't handle checked exceptions, which are the most common exceptions in the system.

There is no way to extend Stream with your own methods.

Still 8 primitive types to wrestle with.

Just to name a few issues. And there are lots and lots more.

The language is simply not extensible enough to write anything elegantly.

Re:Kotlin becomes second most popular language on the JVM by vips7L on Thursday February 06, 2020 @12:05PM (#22257816)
Just handle your catched exceptions? It's not that hard.

  () -> {
     try {
       // do work
     } catch (IOException ex) {
       throw new UncheckedIOException(ex);
     }
  }

I also agree with Goetz that extension functions aren't something we need.
Re:Kotlin becomes second most popular language on the JVM by int_19h on Thursday February 06, 2020 @11:09PM (#22263150)
What's the point of even having checked exceptions, if you're going to have an unchecked counterpart for every one of them just so that you can flow them through lambdas?
Re:Kotlin becomes second most popular language on the JVM by pjmlp on Thursday February 06, 2020 @01:10PM (#22258502)
Not only isn't hard, one can write a generic utility method.

Regarding extension methods, while they are nice, with import static it just a matter where the extended type comes, big deal.

And from experience in .NET world, hunting them down isn't always fun, even if they are just Ctrl+F12 away.

Re:Kotlin becomes second most popular language on the JVM by cryptos on Friday February 07, 2020 @06:18AM (#22264940)
It is not hard but cumbersome, ugly and ruins readability when used a lot.
Re:Kotlin becomes second most popular language on the JVM by lmm on Thursday February 06, 2020 @08:10PM (#22262270)
> Lambdas can't handle checked exceptions, which are the most common exceptions in the system.

You can do exactly the same thing that Kotlin would do for you and just rethrow them as runtime exceptions. It's one extra wrapper call; not great, but not a huge overhead either.

> There is no way to extend Stream with your own methods.

That's just syntax sugar; all it's actually doing is calling a static method, which you can still do in Java.

> Still 8 primitive types to wrestle with.

You can just ignore them and use the object versions everywhere, and then it's not a problem.

There are a bunch of irritating warts in Java, but irritating warts alone are not worth switching language over.