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

Except 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.




Kotlin 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.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: