3 ms·
It's not really called out as such, but the C# 8 feature Nullable Reference Types is an example of deeply embedding flow typing into a language. The nullability
by phillipcarter 5y ago
It's not really called out as such, but the C# 8 feature Nullable Reference Types is an example of deeply embedding flow typing into a language. The nullability state of a reference type can change based on many things you can do in code. It's really neat and extremely intricate.
- SideburnsOfDoom 5y agoIt's exactly that. e.g. inside "if (x != null) { }", or after "x = y ?? throw new ArgumentNullException()" then x is known not null. C# has flow types, but only in this specific and limited way. You could say that about a lot of programming language features.