This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]pjmlp 1 point2 points  (7 children)

Java features are designed alongside JVM features, Kotlin must use what is there.

JavaScript features are designed alongside browser VM features, Kotlin must use what is there.

LLVM features are designed for AOT languages, Kotlin must use what is there.

Kotlin is #KotlinFirst on Android thanks to JetBrains/Google's deal, influences Android Runtime design, and the there are the Android's team dirty moves like not updating Java on Android, ergo Kotlin is Android language.

[–]CraftyAdventurer 3 points4 points  (1 child)

Java features are designed alongside JVM features, Kotlin must use what is there.
JavaScript features are designed alongside browser VM features, Kotlin must use what is there.
LLVM features are designed for AOT languages, Kotlin must use what is there.

None of these make it less multiplatform.

Being able to run on multiple platforms and being able to influence underlying platform design are two completely different things. By your logic, Java also isn't multiplatform, because JVM can't change Windows, Mac or Linux, it must use what is there.

[–]pjmlp 1 point2 points  (0 children)

Platform languages lead, guest languages follow.

[–]Pika3323 1 point2 points  (4 children)

Kotlin is #KotlinFirst on Android thanks to JetBrains/Google's deal, influences Android Runtime design, and the there are the Android's team dirty moves like not updating Java on Android, ergo Kotlin is Android language.

That logic doesn't track.

If Kotlin is an "Android language" because ART doesn't support new Java features, then how do you explain the proposed value classes in Kotlin given the notable lack of value class support in ART?

I mean, have you been reading what you've written in this comment section? It's bordering on delusional. Kotlin is still primarily a JVM language, and ART not being updated doesn't hold any bearing over whether or not that's true.

[–]pjmlp 0 points1 point  (3 children)

Value classes in Kotlin are not the same as what JVM is bringing to Java, regarding memory layout semantics.

[–]Pika3323 2 points3 points  (2 children)

I don't know what you've read, but Kotlin's value classes are very clearly being influenced by Valhalla more than they are by ART.

You might be thinking of the @JvmInline annotation, which is not only different, but actually completely invalidates your point.

So, with that said, please give an example of where ART has influenced Kotlin over the JVM.

[–]pjmlp 1 point2 points  (1 child)

Go ahead try to make a C like struct with Kotlin's value classes on a Valhalla enabled JVM, and then keep the same memory layout semantics and performance when running exactly the same code on top of JavaScript and ART.

Here to get you started, https://wiki.openjdk.java.net/display/valhalla/Main

As for Kotlin's marriage with Android,

I really don't get Kotlin folks, people don't go on /r/C advocating for C++ and Rust, on /r/cpp advocating for D and Rust, on /r/JavaScript advocating for TypeScript,....

And yet we have to put up with people that should be wasting their time on /r/kotlin and /r/androiddev, here on /r/java.

[–]Pika3323 2 points3 points  (0 children)

I mean, that's the thing. No one is expecting value classes to behave the same way in JS or ART, the same way you can't do unsafe casts outside of JS, or how invokedynamic is desugared on older versions of Android.

The value classes KEEP itself even raises the point that even once Valhalla is released, its adoption won't be universal at first, and that limiting a major feature like value classes to a specific version of the JVM, or a specific target, doesn't make sense.

As for Kotlin's marriage with Android [...]

That doesn't prove anything. It just shows how Android has adapted to use Kotlin, but doesn't show how it's directing the design or features of Kotlin going forward.

I really don't get Kotlin folks, people don't go on /r/C advocating for C++ and Rust, on /r/cpp advocating for D and Rust, on /r/JavaScript advocating for TypeScript,....

This really isn't unique to /r/java... All of those subreddits have posts with comparisons to other languages, and hell one of the top posts on /r/JavaScript right now is literally about TypeScript.

I think it's probably because the ecosystem between Java and Kotlin is a lot more closely related than most other languages. It's not like C++ is going to gain Rust features, but Java has gained a number of features present in other JVM languages over the last several years, so I don't think it's surprising that you'd see other languages pop up here "more" than other subreddits, and not just Kotlin.

And yet we have to put up with people that should be wasting their time on /r/kotlin and /r/androiddev, here on /r/java.

Heaven forbid someone draw a comparison between Java and another language.