Richard Groß

IT Archaeology: Mend Software · Create Options · Increase ROI

RSS

Talks

2021-11-19 - Build Stuff

javacsharpnullability

Fixing the Billion-Dollar Mistake in C#

Code
Sir Anthony Hoare calls the null reference his billion dollar mistakeSir Anthony Hoare calls the null reference hi

Sir Anthony Hoare calls the null reference his billion dollar mistake because it has led to "innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years." Whether the order of magnitude is true remains to be proven by the scientific community but I think it's fair to say that null references are one of the leading causes of sleep deprivation for developers about to release. Thankfully most programming languages have been extended with alternate ways to handle "the absence of value" that lead to more expressive code, less room for errors and better sleep. In this talk we will explore the Nullability possibilities that Java provide, the alternate ways that other languages like Python, Kotlin or C# have picked and techniques such as Railway-Oriented Programming or the Null-Object-Pattern that can help if the language of choice does not provide an option. Finally we'll look at migration options for older code bases.

Give Feedback

What worked for you? What could be better? I’d love to hear your thoughts.

Give feedback via

BlueSky LinkedIn

Grab a coffee

Questions or ideas after the talk? Book a virtual coffee with me.

Grab a coffee

Additional links

Post on Mastodon

Choose your Mastodon instance or type its domain. Your post will open in a new tab.