4 ms·
Right. It's a better C, but it has to compete with C's ubiquity: there's make and cc on most *nix boxes. JetBrains went out of their way to make migrating to K
by orthoxerox 6y ago
Right. It's a better C, but it has to compete with C's ubiquity: there's make and cc on most *nix boxes.
JetBrains went out of their way to make migrating to Kotlin as easy as possible: you can literally upgrade your Java project file by file.
- HourglassFR 6y ago> JetBrains went out of their way to make migrating to Kotlin as easy as possible: you can literally upgrade your Java project file by file. Yes, offering a good path to switching (and conversely keeping the old voodoo part of the code no one wants to touch) is the way to go. And as I understand it, Zig offers this possibility as well.
- 1_player 6y agoWhich is why Zig shipping with a functional C compiler with cross platform support is a brilliant idea. Just run `zig cc` and you don't even need `clang` around. https://andrewkelley.me/post/zig-cc-powerful-drop-in-replacement-gcc-clang.html https://andrewkelley.me/post/zig-cc-powerful-drop-in-replace...
- vips7L 6y agoAnd you can directly import C headers into zig files. It's quite amazing.
- pjmlp 6y agoKotlin has settled its future by marring with Android. As Java evolves and Kotlin needs to cater to Mountain View masters, upgrading the Java file won't be enough as many modern features don't exist on ART.
- unscaled 6y agoIt was true for a while that Kotlin got stuck on JVM 8 for its target bytecode, but it's no longer true, Kotlin supports all versions up to 15 now: https://kotlinlang.org/docs/compiler-reference.html#jvm-target-version https://kotlinlang.org/docs/compiler-reference.html#jvm-targ... I think the first Kotlin version to use post-Java 9 bytecode is the Kotlin 1.4.20 using invokedynamic for string concatenation: https://blog.jetbrains.com/kotlin/2020/11/kotlin-1-4-20-released/ https://blog.jetbrains.com/kotlin/2020/11/kotlin-1-4-20-rele... Kotlin sealed classes are planned to be rendered as JVM sealed classes when JVM sealed classes go out of preview (probably Java 17), and the same is planned for mapping Kotlin value classes as Project Valhalla user-defined primitive types. All these features obviously won't be available if you target Android, but they will still be there for you if you don't.
- pjmlp 6y agoAnd it isn't ironic that devs will be forced to use KMM between JVM and ART, despite Kotlin's selling point of Java compatibility? Faking JVM features on other platforms means that the performance is not the expected one when moving across them, and some surprises might happen when linking to libraries that use modern features.