loading...

Discussion on: Creating a new programming language

Collapse
bsara profile image
Brandon Sarà

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.