Click here to Skip to main content
15,883,623 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 Philpott16-Dec-20 23:01
Rob Philpott16-Dec-20 23:01 
GeneralRe: C Sharps - how are you getting on with nullable reference types? Pin
Mark Quennell16-Dec-20 23:09
Mark Quennell16-Dec-20 23:09 
GeneralRe: C Sharps - how are you getting on with nullable reference types? Pin
Rob Philpott16-Dec-20 23:18
Rob Philpott16-Dec-20 23:18 
GeneralRe: C Sharps - how are you getting on with nullable reference types? Pin
Mark Quennell16-Dec-20 23:22
Mark Quennell16-Dec-20 23:22 
AnswerRe: C Sharps - how are you getting on with nullable reference types? Pin
Thornik17-Dec-20 8:32
Thornik17-Dec-20 8:32 
AnswerRe: C Sharps - how are you getting on with nullable reference types? Pin
zezba900018-Dec-20 11:02
zezba900018-Dec-20 11:02 
AnswerRe: C Sharps - how are you getting on with nullable reference types? Pin
AnotherKen18-Dec-20 20:08
professionalAnotherKen18-Dec-20 20:08 
AnswerRe: C Sharps - how are you getting on with nullable reference types? Pin
Adam David Hill27-Dec-20 3:02
professionalAdam David Hill27-Dec-20 3: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 22:00
professionalKornfeld Eliyahu Peter15-Dec-20 22:00 
GeneralRe: I have the feeling they do it on purpose... Pin
W Balboos, GHB16-Dec-20 2:51
W Balboos, GHB16-Dec-20 2:51 
GeneralWSO CCC OTD 2020-12-16 Pin
Sandeep Mewara15-Dec-20 20:52
mveSandeep Mewara15-Dec-20 20:52 
GeneralRe: WSO CCC OTD 2020-12-16 - You win! Pin
OriginalGriff16-Dec-20 0:57
mveOriginalGriff16-Dec-20 0:57 
GeneralOne of the things I love about CP... PinPopular
Marc Clifton15-Dec-20 10:33
mvaMarc Clifton15-Dec-20 10:33 
GeneralRe: One of the things I love about CP... Pin
BillWoodruff15-Dec-20 11:44
professionalBillWoodruff15-Dec-20 11:44 
GeneralRe: One of the things I love about CP... Pin
CodeWraith15-Dec-20 11:50
CodeWraith15-Dec-20 11:50 
GeneralRe: One of the things I love about CP... Pin
Cp-Coder15-Dec-20 15:25
Cp-Coder15-Dec-20 15:25 
GeneralRe: One of the things I love about CP... Pin
Greg Utas16-Dec-20 2:10
professionalGreg Utas16-Dec-20 2:10 
GeneralRe: One of the things I love about CP... Pin
Cp-Coder16-Dec-20 4:40
Cp-Coder16-Dec-20 4:40 
GeneralRe: One of the things I love about CP... Pin
Sander Rossel15-Dec-20 23:43
professionalSander Rossel15-Dec-20 23:43 
GeneralRe: One of the things I love about CP... Pin
Slacker00716-Dec-20 0:39
professionalSlacker00716-Dec-20 0:39 
GeneralRe: One of the things I love about CP... Pin
Marc Clifton16-Dec-20 5:08
mvaMarc Clifton16-Dec-20 5:08 
NewsI am seeing more use of HEIC image format on Apple Phones Pin
Slacker00715-Dec-20 5:56
professionalSlacker00715-Dec-20 5:56 
GeneralRe: I am seeing more use of HEIC image format on Apple Phones Pin
W Balboos, GHB15-Dec-20 6:18
W Balboos, GHB15-Dec-20 6:18 
GeneralRe: I am seeing more use of HEIC image format on Apple Phones Pin
Slacker00715-Dec-20 6:26
professionalSlacker00715-Dec-20 6:26 
GeneralRe: I am seeing more use of HEIC image format on Apple Phones Pin
W Balboos, GHB15-Dec-20 9:02
W Balboos, GHB15-Dec-20 9: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.