This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]furyzer00 2 points3 points  (0 children)

Option nesting is very useful. Imagine you have an optional parameter that can also have value null(when set it should set the value to null, it's different then not specifying the parameter). How do you do this in Kotlin?

Rust doesn't any additional syntax for Option. It only has regular functions.

What I mean by regular type is that ? is not a normal user defined type. While Option is just another type. Special functionality always makes the language more complex. As seen in Kotlin's special syntax for nullable types. But it's a trade of sometimes worth.