Hacker News new | past | comments | ask | show | jobs | submit login

Will Kotlin Native be able to compete with Swift on iOS? The syntax is very similar and it would make for a nice cross platform PL. I was holding off on Swift to see where it was going, but I'd like to add iOS to my dev targets. Objective-C was too verbose for me years ago, but I've heard it has changed a bunch.



I don't think so. Mobile development is almost more about the underlying frameworks than the language itself. At some point Kotlin etc will have to wrap these things. The internal apple swift dev team will always be one step ahead of them as they will have access to the new frameworks before they are released to the public.

Also swift and kotlin are very similar. The folks from kickstarter gave a great presentation about their android/iOS app being written in Swift/Kotlin at a conference I spoke at (UIkonf). Their whole mobile team writes/reviews for both platforms.


Kotlin Native doesn't exist beyond pre-alpha software at this point, so the the question is a bit premature.

In 3-5 years Kotlin might be where Swift is now, but there's nothing guaranteed, just coming up with a GC solution alone is a gigantic engineering effort -- Kotlin, like Scala, Clojure, etc. all benefit from world class GCs, just by being hosted on the JVM. With LLVM you essentially start from scratch, same for porting Java libraries, there's a ton of work involved.

tl;dr; for now it's separate languages for iOS and Android unless you cut some corners with React Native to avoid writing the same app twice.


Please nobody cut corners with React "Native" or other some such nonsense.


Or things like Delphi are an option for cross platform mobile development. Object Pascal is quite nice these days:

https://www.embarcadero.com/products/delphi


At some point it looks like Dart and Flutter might be an option as well. Though with emulated widgets vs native.


On a technical level, it's easy to see how someone might ship a Kotlin compiler that targets LLVM the same way you can e.g. C# via Xamarin.

Practically, though, any solution like that is going to be a second-class citizen in a world where Apple jumps and you ask how high. Xamarin's a great example here, even if Kotlin might be sexier as a language: there are certainly teams building good native iOS apps using Xamarin / C#, but it's hard to see it ever being anything more than a niche tool.


I'm curious to see if the porting from Java to Kotlin on Android apps will prove to be as challenging- and frustrating- as people have described the shift from Objective-C to Swift.


There is literally zero friction between Kotlin and Java since they're interoperable. You can even translate Java files to Kotlin files by selecting a menu option in Android Studio or even cutting and pasting Java into a Kotlin file. Sure, the code may not be optimized fully, but it's a good starting point. Additionally, you can even mix Java and Kotlin files in a project.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: