7 ms·
One has structures, ARC, proper extensions, good protocols/interfaces, flexible enums, and runs natively. The other one doesn't. I think I'll choose the former.
by NathanFlurry 9y ago
One has structures, ARC, proper extensions, good protocols/interfaces, flexible enums, and runs natively. The other one doesn't. I think I'll choose the former.
- NathanFlurry 9y agoYes, I know about Kotlin Native, but it's not quite there yet.
- Tanegashima 9y agoStill doesn't make up for Swift's language superiority.
- Tanegashima 9y agoExcellent C and Objective C interoperability too. As for the post, it's ridiculously fanboyish. The same comparison could be made with other older languages towards Kotlin. Microsoft F# comes to mind, for example.
- guelo 9y agoKotlin Native ships with an ARC. But depending on the application ARC can be a disadvantage since it can't automatically handle reference cycles like Kotlin on the JVM can.
- kbd 9y ago> [Kotlin Native] features automatic reference counting with a cycle collector on top, but what the final memory management solution(s) will look like is unknown at this point. https://blog.jetbrains.com/kotlin/2017/04/kotlinnative-tech-preview-kotlin-without-a-vm/ https://blog.jetbrains.com/kotlin/2017/04/kotlinnative-tech-...
- throwaway7645 9y agoIs the Native AOT compiled, or just a different byte code VM? I assume the latter?
- kybernetikos 9y agoThe Kotlin/Native compiler produces standalone executables that can run without any virtual machine. > https://blog.jetbrains.com/kotlin/2017/04/kotlinnative-tech-preview-kotlin-without-a-vm/ https://blog.jetbrains.com/kotlin/2017/04/kotlinnative-tech-...
- throwaway7645 9y agoNice...if only a good REPL, I could finally leave Python.
- coldtea 9y agoOne has a top-notch IDE from a top-notch IDE vendor. The other has XCode. Also, ARC aside, for the 3-4 items you mentioned, either Kotlin also also has them, or has just as good alternatives. And none of those are life-changing. ARC vs a good GC is just a different tradeoff (no cycle detection vs pauses, etc). I'm sure you can find some things where Swift is better at, and others where Kotlin is. But not that many to proclare one or the other the definite winner, and surely not a major one.
- Tanegashima 9y agoSure thing... When will Jetbrain have a decent interface builder? Decent instrumentation? Decent documentation viewer? Can you get an object graph with JetBrains? Xcode isn't perfect, but it's way better than JetBrains. Just because one has one feature that one doesn't have, doesn't mean that Xcode beats JetBrain's IDE all day.
- deleted 9y ago[deleted]
- cromwellian 9y agoYes, yes, and yes, plus Jetbrain IDEs have much superior code assistance and navigation compared to Xcode. Xcode is clearly worse than Visual Studio, JetBrains, Eclipse, and many other IDEs I've used over the past 20 years in the industry when it comes to code navigation, refactoring, and basic editing. Xcode does only one thing well and that's interface builder, but if you were writing a backend application with no UI would you choose Xcode? I'd rank it lower than emacs and vim for editing tasks.
- Tanegashima 9y agoNo, it doesn't. Everything that Jebrains has, Xcode also has, and most of times, better implemented.
- wruza 9y agoOtoh, my colleagues were surprised seeing easy and good-looking two-panel diff and blame right in Xcode. Analyzis build (one that shows blue arrows for how we can get into trouble) was surprise too. It seems that preference depends on use cases and two products can differ in different ways, not only as superior vs. regular. I never did anything in VS though, cause its interface always turned me 180 after first run. And I can write Makefile and .gvimrc from scratch much faster than it installs itself.
- danieldisu 9y agoI'll take good IDE support over any of the things you mention above. Seeing how my colleagues refactor in XCode makes me cringe every time... Kotlin support in IntelliJ is almost as good as Java.
- Tanegashima 9y agoSo, when is JetBrains going to have a decent documentation viewer?
- dep_b 9y agoYet they could use AppCode by JetBrains if they wanted.
- markcerqueira 9y agoI've done both iOS and Android and I'll take Java + Kotlin + Android Studio over the iOS stack any day.
- codecamper 9y agoHave you tried AppCode?
- barbs 9y agoThey're not really in direct competition. Try writing an Android app in Swift, or an iOS app in Kotlin. Technically possibly either way, but one's definitely more suited than the other for each purpose.
- Cthulhu_ 9y agoThat's more about APIs and vendor support than language tbf. As chance might have it, the Swift documentation has a section on programming for Android: https://github.com/apple/swift/blob/master/docs/Android.md https://github.com/apple/swift/blob/master/docs/Android.md And RoboVM has an article on using Kotlin for iOS development: https://robovm.com/kotlin-for-cross-platform-mobile-app-development/ https://robovm.com/kotlin-for-cross-platform-mobile-app-deve...
- nathan_f77 9y agoWhich one is easier? I need to write some cross-platform native code for my React Native app, and I'm having a really hard time deciding on the language. I honestly didn't know that I could use either Kotlin OR Swift for both platforms. But which would be easier to get running on Windows? I also need to write a version that works on the web, and I've heard that Kotlin can transpile to JS. So that's pretty amazing if that works. Otherwise I was considering C, C++, or Rust.
- s73ver 9y agoUnfortunately, you don't really get to make the decision by itself. You kinda have to go with which platform am I building on first.