-
Notifications
You must be signed in to change notification settings - Fork 226
Closed
Labels
nnbdNNBD related issuesNNBD related issues
Description
This issue is to discuss the question of whether the Object
type should be nullable by default when we enable NNBD types.
Arguments I've hard so far:
For:
- Since
null
supports all of the operations that are defined onObject
, it works perfectly well anywhere anObject
is expected. - It's not clear what tangible benefit you get from being able to say that something can be any type, except Null.
Against:
- There is no way to express the type of a non-null object without this. So you can't write a generic class which requires only non-nullable type arguments. Does this matter?
- You won't get definite assignment warnings on variables of type
Object
.
trietbui85hpoul
Metadata
Metadata
Assignees
Labels
nnbdNNBD related issuesNNBD related issues