Designing Nullable Reference Types in F#
summary
F# 5 adds nullable reference types aligned with C# 8 but preserves backwards compatibility by emitting warnings not errors and encoding nullability as metadata attributes. The compiler uses pattern-matching helpers, a new generics constraint for non-null, and attributes like NullableAttribute with bool[] to represent nested nullability to other compilers. Experiments on real code show many surprising warnings (files with dozens of breakages, projects with hundreds of warnings). Oddly, options emit null and the design wrestles between oblivious semantics vs assume-nonnull.
AI-written summary · about
chapters (28)
- 0:00Introduction
- 2:42Knowability Assumptions
- 3:13Nothing
- 3:39Implicit
- 10:48Design Goals
- 17:05Pattern Matching
- 19:58Fsharp Rules
- 25:25Noble Value Types
- 26:18Type Relations
- 27:20Knowable
- 28:43Not Null
- 30:20Nominal Types
- 31:45No Attribute Types
- 32:05FSharp
- 32:25Nullable Reference Types
- 33:13Difficult Design Choice
- 34:03No Reference Exceptions
- 34:32Knowable Assumption
- 35:23Two Paths
- 36:47F Sharp
- 37:24Default Values
- 38:18ClineMutable
- 39:18OptionType
- 41:34Why is it important
- 43:51Links
- 46:53Interrupt
- 47:04ByRef
- 48:11Code Base
related talks
01h 00mWhat's new in C#? Exciting new features in C# 8.0, 9.0 and 10!
15mSimple Reference Immutability for System F-sub
01h 01mBetter Code with C++ Attributes
32mBeyond the &: A Future for Native Smart Pointers in Rust
24mA Bowtie for a Beast: Overloading, Eta Expansion, and Extensible Data Types in F...
01h 27mUniversal/Forwarding References - A Key to More Modern C++
25mSwift's Pointy Bits: Unsafe Swift & Pointer Types
15mQualified Types with Boolean Algebras
