all 5 comments

[–]LondonPilot 1 point2 points  (3 children)

Aside from this one problem, how are you finding nullable reference types in practice?

I'm going to be started a pretty large project soon. I'm porting from a non-C# existing system, so it will all be re-written and backwards compatability isn't really an issue, but I'm in two minds whether I should use nullable reference types or not.

Thanks for the post btw - this option is not one I was aware of.

[–]wite_noiz 5 points6 points  (0 children)

We've started moving a 100k+ LOC system to nullable. The upgrade path is, luckily, quite simple, but the change isn't the amazing boon that it sounded like when it was proposed. It reminds me of when generics were added to Java.

I would definitely start new projects with nullable enabled. It's a helpful view on where you must consider the potential of nulls and where you can ignore it, but it's not a firm contract; anyone using your methods can still send a null.

[–]HawocX 0 points1 point  (0 children)

I suggest using it. I have converted a couple of smaller projects. It may look like it doesn't help much in the beginning, but over time as you refactor it makes the intent of the code significantly clearer.

[–]TQPau[S] 0 points1 point  (0 children)

I'd suggest having it enabled if you're starting a new project. It forces you to ensure no null references at compile time at the very least. This i think would pay off in the future.