-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed as not planned
Description
- Proposal added
- Discussed in LDM
- Decision in LDM
- Finalized (rejected)
- Spec'ed
Specification: https://github.com/dotnet/csharplang/blob/main/proposals/param-nullchecking.md
In short though this allows for standard null validation on parameters to be simplified using a small annotation on parameters:
// Before
void Insert(string s) {
if (s is null)
throw new ArgumentNullException(nameof(s));
...
}
// After
void Insert(string s!!) {
...
}LDM history:
- https://github.com/dotnet/csharplang/blob/master/meetings/2019/LDM-2019-01-14.md
- https://github.com/dotnet/csharplang/blob/master/meetings/2019/LDM-2019-07-10.md#param
- https://github.com/dotnet/csharplang/blob/main/meetings/2022/LDM-2022-04-06.md#parameter-null-checking
- https://github.com/dotnet/csharplang/blob/main/meetings/2022/LDM-2022-04-13.md#parameter-null-checking
yaakov-h, orthoxerox, qrli, DavidArno, Unknown6656 and 277 moreLiminiens, tupieurods, MrJul, Neme12, alrz and 104 moreHalidCisse, ruxo, TheFanatr, weitzhandler, bonesoul and 4 moreDavidArno, Unknown6656, GrabYourPitchforks, jrusbatch, DamienFlury and 23 moremaxkatz6, gatsbys, readonlyden, CCRcmcpe, joshuapassos and 22 morewhoisj, TheUnlocked, DamienFlury, napernik, alizahid4004 and 63 moresrkischa, jack9ye, alaatm, HalidCisse, TheFanatr and 10 morepaulomorgado, 0xced, HalidCisse, krlosmederos, TheFanatr and 10 more