Kotlin has nullable types, but their's are non-nullable by default. I personally am not a fan of the default, and I personally don't agree with their reasoning for it. So, I would suggest a "bang" in your type declaration for non-nullables (a: int! = 42). I love the question mark syntax usually used for optional chaining (blah?.blee?[42]?.blue?()). For nullish coalescing, I think that either the Elvis operator (?:) or a double question mark (??) are both intuitive and easy to use.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Kotlin has nullable types, but their's are non-nullable by default. I personally am not a fan of the default, and I personally don't agree with their reasoning for it. So, I would suggest a "bang" in your type declaration for non-nullables (
a: int! = 42
). I love the question mark syntax usually used for optional chaining (blah?.blee?[42]?.blue?()
). For nullish coalescing, I think that either the Elvis operator (?:
) or a double question mark (??
) are both intuitive and easy to use.