News for hackers. Stuff that matters.
Re:Java 16 by eweise on Tuesday March 16, 2021 @12:11PM (#26478724)
I think Kotlin is more at risk than Scala on the server at least. Scala still has a lot of advanced features that sets itself apart. Kotlin is a better Java but Java is catching up fast.
Re:Java 16 by ragnese on Tuesday March 16, 2021 @02:55PM (#26481238)
Agreed. But Kotlin 1.5 will have enough interesting stuff with the new inline class and const methods that I think it'll keep its appeal for quite some time.
Re:Java 16 by jicea on Tuesday March 16, 2021 @04:28PM (#26482430)
Developing now 80% in Kotlin and 20% in Java (on backend), I really think the main advantage of Kotlin over Java is nullability. You can use @Nullable/@NotNull annotations in Java, but nullability being a part of the type system in Kotlin is better. I also love being able to create simple functions and add extension methods to existing classes. But still, nullability is the strongest advantage of Kotlin and I don’t see how Java will address it.
Re:Java 16 by ragnese on Tuesday March 16, 2021 @04:39PM (#26482599)
Agreed about nullability. And Java will never fix it fully or I'll eat my hat.

... but, you have to be pretty damn good to win out over the native language of a platform. And if it were just Kotlin today vs. Java 16, I think Kotlin is a much nicer language, but it doesn't really differentiate itself that much. Sure, it's syntax is much nicer, but you still basically have the same semantics as Java. You have classes; everything is a reference; no const/immutable data; no (good) general way to clone things; you have the same-ish type system with inheritance and interfaces, but no type classes; still have weird shit like sized numeric types with over/underflow; exceptions for error handling; etc.

At least Scala has monads and type classes, so you can say it actually has some expressability that Java truly doesn't. I'm not sure that Kotlin has that. Clojure is a totally different beast that really doesn't directly compete over Java devs, IMO. It just happens to use the JVM as a platform.

Re:Java 16 by roguas on Thursday March 18, 2021 @08:39AM (#26502029)
Yup, clojure people have no love for jvm. It's a source of libraries, period.
Re:Java 16 by kaba0 on Tuesday March 16, 2021 @04:27PM (#26482404)
But I fear kotlin will fall in-between all the platforms they try to support, and will end up comparatively bad on all. Like, you can’t really target both your coroutines on each platform as well as project loom properly, same with project Valhalla and the like.
Re:Java 16 by ragnese on Tuesday March 16, 2021 @04:43PM (#26482667)
Why can't coroutines take full advantage of Loom's green threads on JVM and do other stuff on Native/JS/whatever?

I generally agree that being multiplatform is a lofty goal. And as much as I like Kotlin, it clearly inherits some of Java's (IMO) deficiencies. I'm not sure why I'd want those deficiencies exported to my native code when I could use lots of other nice languages.

Re:Java 16 by BoyRobot777 on Tuesday March 16, 2021 @05:22PM (#26483162)
I think Loom can be abstracted away by Kotlin quite easily. Valhalla on the other hand won't work at all. You won't be able to have inline classes in android/older Java versions. Even more - specialized generics.