Replies: 1 comment 12 replies
-
'Assertion' makes it sound like it is itself a runtime check, which would be misleading since it is not. I'd rather it had been called a null-oblivious or null-blind operator. The most accurate name for it would be "nullability warning suppression operator." |
Beta Was this translation helpful? Give feedback.
12 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The is might be treated as a proposal, otherwise any clarification on the intention of this particular name is welcome. Note that this might partially subjective.
When speaking of "null-forgiving", it implies something similar to
null
is allowed where it would not be otherwise". This is essentially whatNullable<T>
and its shorthand equivalent of an appended?
do, fulfilling the exact opposite purpose of!
.Therefore, i think it would be more intuitive to treat
!
as a "non-null-assertion"-operatorThis would also avoid confusion with an appended
?
which considering its purpose has more reason of being named "null-forgiving".Beta Was this translation helpful? Give feedback.
All reactions