3 ms·
Then you ought to try Kotlin! It's a lot like Swift but with great libs and tooling.
by phreack 8y ago
Then you ought to try Kotlin! It's a lot like Swift but with great libs and tooling.
- bsaul 8y agoExcept kotlin doesn't have anything close to swift regarding enums + switch (like : enum with associated values of various arity, and a switch that makes sure you're handling all the cases), nor regarding null safety. And, it still has java underneath, which means everytime you're using a java lib, you have absolutely no idea what the null safety is going to be underneath (which is also the case with swift and objc libs, but which diminishes the attractivness of using the java libs ecosystem) EDIT: also, value-based programming is highly encouraged by the full support for structs, either mutable or immutable. That's also a huge plus for safety against race conditions.
- dualscyther 8y agoKotlin has sealed classes (enums), when expressions (switch checking) and absolutely does have null safety. It also reinforces null safety when using Java libraries if they have nullability annotations.
- saagarjha 8y agoKotlin might look like Swift on the surface, but under that they're very different in how they're designed.
- millstone 8y agoSurely the question of using Kotlin is dominated by whether or not you can tolerate the JVM.
- singularity2001 8y agoyou can compile to native with kotlin-native but compilation times are even more abysmal than the jvm kotlin.
- izacus 8y agoWhat difference does that make?