Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It absolutely is true. The ?. operator is nominally different to map/flatMap. It does not extend to other monadic types and neither can you abstract with map/flatMap over nullable types. Not to mention more advanced type system features like higher kinded data that Kotlin can only dream of. Option can be mapped over types, ? can not. Option can be handled by sop-generic programming, ? requires a special case. Option is bijective, ? is not.


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

Search: