Live data from Hacker News

Kotlin Multiplatform for Android and iOS Apps

rockandnull.com

71–80 of 82 posts

Re: Kotlin Multiplatform for Android and iOS Apps

#71

Earlier quoted context omitted.

iOS dev here. What you're missing is that a ton of native-code developers (me included) aren't interested in adopting an abstraction layer that has to be tweaked to approximate the look and feel of the native OS UI layer when we could just built it natively to begin with and save all that effort. We've seen PhoneGap/Cordova, we've seen React Native and we'll keep seeing money thrown away on pretending that there aren…

The idea is you can write SwiftUI on iOS, whilst connecting to business logic written in Kotlin.

No no no. Just look at the janky stuff one needs to do to compile Kotlin for an iOS project. Plus, object lifetime semantics differ. Now you won’t be able to write Kotlin native code without thinking of iOS rules. So now you have the worst of unfamiliar worlds with a “most fast” product speed.

Re: Kotlin Multiplatform for Android and iOS Apps

#72
post #30

I’m familiar with phone gap which I believe does this, but is it kosher to have some sort of proxy app that gives you native api calls and otherwise just use a web page? I know you can do something similar with a web view but was curious.

Nah, this is more like React Native than PhoneGap, there’s no webview involved. The Kotlin code is somehow compiled into something that can run on iOS in a native or native-ish way.

You can do the same thing the other way around - https://github.com/apple/swift/blob/main/docs/Android.md.

Re: Kotlin Multiplatform for Android and iOS Apps

#73
post #70

Earlier quoted context omitted.

Don't forget C#/F#. Microsoft's been leaning hard into cross-platform with MAUI.

Hot take: Microsoft can't do good UI frameworks and it shows. XAML makes some things really hard, resulting in loads of ValueConverters for example. Part of my bad experience might just be the learning curve but honestly I'm not surprised so much software is built using Electron.

I am actually using Avalonia+ReactiveUI for my current project (MAUI doesn't support Linux or F# last I checked), which I understand is similar to WPF... what a hot mess it is to wire up models to views in just the right way, especially in F#.

Re: Kotlin Multiplatform for Android and iOS Apps

#74

I'm puzzled why Kotlin isn't getting enough attention on HN, at least as much as Rust or Zig. Kotlin is indeed popular in it's specific domain (Android & Java). But the company is keen to position it as "write once run anywhere" space with a strong focus on multiplatform development. 1. The build system provides platform specific bindings for free (huge plus compared to the hassle of writing the core in C/C++ and the…

I think modern Java has stolen a lot of Kotlin’s thunder. The differences between the languages shrink with each Java release, and server side Kotlin isn’t evangelized by its main cheerleader, google. It’s a GC language, so rust/zig are not good comps. Go, Java, Scala, Server side JS/Node, or python. These are the comps. Personally, I’ve written a number of non-trivial, server side applications in Kotlin. The extra c…

These are all fair points for Java on the JVM or Android, but Kotlin Multiplatform does things that are well beyond the purview of the JCP.

It has downsides to be sure but it's not as simple as evaluating it as just another option for compiling to bytecode anymore.

Re: Kotlin Multiplatform for Android and iOS Apps

#75

Kotlin is a Google project that wants to be cross platform, write once run everywhere. So is dart/flutter. I feel dart is further along on this. Seems a little silky having 2 projects aimed at the same thing?

Kotlin is not a Google project. It is made by JetBrains. It says so right up front on their web page: https://kotlinlang.org/

Oops what a mistake, apologies. That's what I get for misreading Wikipedia. I stand corrected.

Re: Kotlin Multiplatform for Android and iOS Apps

#76

I'm puzzled why Kotlin isn't getting enough attention on HN, at least as much as Rust or Zig. Kotlin is indeed popular in it's specific domain (Android & Java). But the company is keen to position it as "write once run anywhere" space with a strong focus on multiplatform development. 1. The build system provides platform specific bindings for free (huge plus compared to the hassle of writing the core in C/C++ and the…

`kotlinc-native` is one of the slowest compilers out there. Try compiling a "Hello, World!" program. It's slower than `rustc`. By a lot.

Re: Kotlin Multiplatform for Android and iOS Apps

#78

I'm puzzled why Kotlin isn't getting enough attention on HN, at least as much as Rust or Zig. Kotlin is indeed popular in it's specific domain (Android & Java). But the company is keen to position it as "write once run anywhere" space with a strong focus on multiplatform development. 1. The build system provides platform specific bindings for free (huge plus compared to the hassle of writing the core in C/C++ and the…

iOS dev here. What you're missing is that a ton of native-code developers (me included) aren't interested in adopting an abstraction layer that has to be tweaked to approximate the look and feel of the native OS UI layer when we could just built it natively to begin with and save all that effort. We've seen PhoneGap/Cordova, we've seen React Native and we'll keep seeing money thrown away on pretending that there aren…

Stack traces look like garbage though. I've developed a library for KMM. The iOS devs didn't want to touch it, so write once, make android devs keep it up. Also it was the network layer, so that's the easiest shit to write natively.

Re: Kotlin Multiplatform for Android and iOS Apps

#79
post #36
post #9

I've mostly stayed away from mobile development because Android projects look too complicated to get started on even NDK projects. The value of learning those APIs to me isn't even close to what you get by learning Web APIs. So if I invested my time to learning it I don't feel Is get as much out of it. Maybe something like Kotlin/Compose Multiplatform can help. But, really if they made Android APIs (or React-native/F…

Try Flutter. It's amazing how easy it is to get started with a desktop app in any OS, and then just run it on mobile (or emulators which are easy to install via Android Studio or VS Code) when you want to without having to deal with almost any of the crap iOS and Android developers need to... Flutter generates all manifests and what not, and the docs show exactly what to do to sign artifacts and stuff that requires y…

[flagged]

Re: Kotlin Multiplatform for Android and iOS Apps

#80
post #42

I'm puzzled why Kotlin isn't getting enough attention on HN, at least as much as Rust or Zig. Kotlin is indeed popular in it's specific domain (Android & Java). But the company is keen to position it as "write once run anywhere" space with a strong focus on multiplatform development. 1. The build system provides platform specific bindings for free (huge plus compared to the hassle of writing the core in C/C++ and the…

I use Kotlin daily at my job (I have to) and I'm not impressed. It is a new language that ignores most of the innovations in Programming Language Theory from the last 20 years. It only improves on Java by making the syntax less verbose and adding coroutines but almost doesn't add any benefits in terms of semantics.

I'd really, genuinely be interested in reading more about this theory, and what your criticisms of kotlin are.

No, really, I'm interested!

Post reply on HN