4. Checked exceptions (could be more powerful in Swift, but they are there, and when not used in excess they are actually pretty nice, and Swift's `try` syntax is excellent)
5. Swift's enums and `switch` feel both more straightforward and more powerful than Kotlin's sealed classes and `when` (I'm not sure about this, but I think there are situations where you get better coverage checking with Swift's pattern matching.)
6. Reified generics (I know that opinions on this vary, and it doesn't often matter, but I've been just writing some code where it's been nice to be slightly more type safe with Any values)
7. More principled null handling (Optional is just an enum, although with some extra syntactic support)
8. `if let`, `if case`, `guard let` and `guard case` allow for simpler handling of multiple values than Kotlin's `?.let` and null checks
I like Kotlin being more expression oriented, but in the end I often find my Swift code to be less contorted due to the more powerful conditional constructs. GC vs ARC isn't much of an issue, both work for me.
1. Value types
2. Tuples
3. Key paths
4. Checked exceptions (could be more powerful in Swift, but they are there, and when not used in excess they are actually pretty nice, and Swift's `try` syntax is excellent)
5. Swift's enums and `switch` feel both more straightforward and more powerful than Kotlin's sealed classes and `when` (I'm not sure about this, but I think there are situations where you get better coverage checking with Swift's pattern matching.)
6. Reified generics (I know that opinions on this vary, and it doesn't often matter, but I've been just writing some code where it's been nice to be slightly more type safe with Any values)
7. More principled null handling (Optional is just an enum, although with some extra syntactic support)
8. `if let`, `if case`, `guard let` and `guard case` allow for simpler handling of multiple values than Kotlin's `?.let` and null checks
I like Kotlin being more expression oriented, but in the end I often find my Swift code to be less contorted due to the more powerful conditional constructs. GC vs ARC isn't much of an issue, both work for me.