|
rallets wrote: and it's perfect to make sure juniors do not introduce tons of bugs
Null pointers are not significant, to me, in production.
Logic errors however are.
And the only way to prevent that for juniors and seniors is meaningful code reviews.
|
|
|
|
|
This entire push to eliminate Null is misguided. The reason is that in the real world sometimes you really have no information, which is what Null represents. Look at numeric data types, zero is not the same as NULL. Zero is a value but NULL represents no value. This is a fundamental semantic difference.
|
|
|
|
|
Generally the idea is thus...
Someone misused it - thus it must be a problem.
Then they come up with an idiom that could fix it, that single problem, while introducing other potential problems (like using magic values for no value) and then proclaim that the world is a wonderful place.
Thus hoping that a technology fix can absolve them of relying on process (non-technology) solutions which have been proven (studies) to reduce problems.
|
|
|
|
|
I fully agree with everything you wrote, however, nullable checking is not necessarily about eliminating the use of null per se. It's about telling things that can legitimately be null (then it reminds you to check) apart from things which should never be null (then it reminds you to not put a null in there).
|
|
|
|
|
Not using .Net 7 yet, but using this in .Net 4.8, .Net Core 31, 5, and 6.
Yeah, the warnings can be annoying, but the benefit can be significant too. Especially with junior devs who aren't used to null checking everywhere/don't have the experience to spot all the potential problems... but it's good for us oldies too, everybody misses stuff sometimes.
The first warning in that list is the one that annoys me most. There are several potential work arounds depending on the specifics, but I often feel none are good
|
|
|
|
|
It only makes sense for ASP.NET services or maybe new code bases that its critical you don't have null.
.NETFW, Unity3D or other C# projects that heavily use older .NET frameworks its a nightmare.
Only new code that uses new APIs does it work well.
|
|
|
|
|
Rear meat game (10)
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
Too easy! Better double!
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
They're always easy if you know the answer Peter and I think you meant bet double
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
One of those ones that leap out of the screen. Better bet double, maybe.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Nice one!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OK, 3 hours is enough...
BACK rear
GAMMON meat
BACKGAMMON game
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Good man YAUT
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
If he hadn't taken it, I would have.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
Or if you would wait until at least 6 in the morning I would have answered as well
|
|
|
|
|
Where do fish go on vacation?
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Finland.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
winner
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
Wales.
Though I'm sure someone will point out that whales aren't fish.
|
|
|
|
|
Why do nuclear reactors have ponds?
So they can have their fission chips.
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.
|
|
|
|
|
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
|
I always found them on Cape Cod.
|
|
|
|
|
Karpathos[^] or Pikes Peak[^] or Cape Cod[^] to name but a few.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Their kids don't... they just stay in school.
|
|
|
|