Skip to content
Discussion options

You must be logged in to vote

I find it interesting that you highlighted Kotlin's val syntax. That's exactly the feature that I want, and is the keyword that inspired this idea.

Kotlin's val syntax has nothing to do with nullability, it has to do with mutability. Kotlin uses the !! postfix operator to forcibly unwrap a nullable value and throw at runtime.

I just, basically, want a keyword that's a catch-all, like var, but I don't want warnings, and I don't want ! because it's ugly, distracting, and a code-smell, but the IDEs just getting rid of the warnings IMO is not a proper solution, because the variable is nullable.

As mentioned, you can set those warnings to errors, and achieve this goal today with zero langu…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
4 replies
@davidalamb
Comment options

@HaloFour
Comment options

@davidalamb
Comment options

@HaloFour
Comment options

Answer selected by davidalamb
Comment options

You must be logged in to vote
1 reply
@antont
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants