Click here to Skip to main content
15,116,214 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: C Sharps - how are you getting on with nullable reference types? Pin
Rob Philpott17-Dec-20 0:01
MemberRob Philpott17-Dec-20 0:01 
GeneralRe: C Sharps - how are you getting on with nullable reference types? Pin
Mark Quennell17-Dec-20 0:09
MemberMark Quennell17-Dec-20 0:09 
GeneralRe: C Sharps - how are you getting on with nullable reference types? Pin
Rob Philpott17-Dec-20 0:18
MemberRob Philpott17-Dec-20 0:18 
GeneralRe: C Sharps - how are you getting on with nullable reference types? Pin
Mark Quennell17-Dec-20 0:22
MemberMark Quennell17-Dec-20 0:22 
AnswerRe: C Sharps - how are you getting on with nullable reference types? Pin
Thornik17-Dec-20 9:32
MemberThornik17-Dec-20 9:32 
AnswerRe: C Sharps - how are you getting on with nullable reference types? Pin
zezba900018-Dec-20 12:02
Memberzezba900018-Dec-20 12:02 
AnswerRe: C Sharps - how are you getting on with nullable reference types? Pin
AnotherKen18-Dec-20 21:08
professionalAnotherKen18-Dec-20 21:08 
AnswerRe: C Sharps - how are you getting on with nullable reference types? Pin
Adam David Hill27-Dec-20 4:02
professionalAdam David Hill27-Dec-20 4:02 
"they're nullable already surely?"

The point is by opting into nullables it makes them NON-nullable by default, rather than nullable by default.

I've dived in with both non-nullable reference types and C# 9 records in a greenfield project. A few sprints in and I'm really pleased with how it's influenced / affected the codebase. Records are wonderful for letting details stand out in simple classes, and their immutability drives your design down a positive path. Similarly with the non-nullable reference types, it can be a little jarring at first, but it pretty much just means the compiler can infer more than it could before, and points you to more issues. Sometimes they're "non-issues", that wouldn't really have mattered, but there have definitely been a couple of points where it's caused me to think something deeper that may have been an issue.

Null has its uses, and you're not stopped from using it. By introducing Nullable Reference Types into your codebase you're not avoiding the use of null, you're just making it absolutely clear when something can and when something can't be null. And in my opinion that's strong a positive.
GeneralI have the feeling they do it on purpose... Pin
Kornfeld Eliyahu Peter15-Dec-20 23:00
professionalKornfeld Eliyahu Peter15-Dec-20 23:00 
GeneralRe: I have the feeling they do it on purpose... Pin
W Balboos, GHB16-Dec-20 3:51
mveW Balboos, GHB16-Dec-20 3:51 
GeneralWSO CCC OTD 2020-12-16 Pin
Sandeep Mewara15-Dec-20 21:52
mvaSandeep Mewara15-Dec-20 21:52 
GeneralRe: WSO CCC OTD 2020-12-16 - You win! Pin
OriginalGriff16-Dec-20 1:57
mveOriginalGriff16-Dec-20 1:57 
GeneralOne of the things I love about CP... Pin
Marc Clifton15-Dec-20 11:33
mvaMarc Clifton15-Dec-20 11:33 
GeneralRe: One of the things I love about CP... Pin
BillWoodruff15-Dec-20 12:44
mveBillWoodruff15-Dec-20 12:44 
GeneralRe: One of the things I love about CP... Pin
CodeWraith15-Dec-20 12:50
MemberCodeWraith15-Dec-20 12:50 
GeneralRe: One of the things I love about CP... Pin
Cp-Coder15-Dec-20 16:25
MemberCp-Coder15-Dec-20 16:25 
GeneralRe: One of the things I love about CP... Pin
Greg Utas16-Dec-20 3:10
mvaGreg Utas16-Dec-20 3:10 
GeneralRe: One of the things I love about CP... Pin
Cp-Coder16-Dec-20 5:40
MemberCp-Coder16-Dec-20 5:40 
GeneralRe: One of the things I love about CP... Pin
Sander Rossel16-Dec-20 0:43
professionalSander Rossel16-Dec-20 0:43 
GeneralRe: One of the things I love about CP... Pin
Slacker00716-Dec-20 1:39
professionalSlacker00716-Dec-20 1:39 
GeneralRe: One of the things I love about CP... Pin
Marc Clifton16-Dec-20 6:08
mvaMarc Clifton16-Dec-20 6:08 
NewsI am seeing more use of HEIC image format on Apple Phones Pin
Slacker00715-Dec-20 6:56
professionalSlacker00715-Dec-20 6:56 
GeneralRe: I am seeing more use of HEIC image format on Apple Phones Pin
W Balboos, GHB15-Dec-20 7:18
mveW Balboos, GHB15-Dec-20 7:18 
GeneralRe: I am seeing more use of HEIC image format on Apple Phones Pin
Slacker00715-Dec-20 7:26
professionalSlacker00715-Dec-20 7:26 
GeneralRe: I am seeing more use of HEIC image format on Apple Phones Pin
W Balboos, GHB15-Dec-20 10:02
mveW Balboos, GHB15-Dec-20 10:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.