Use c# 8.0 and enable nullable reference
See original GitHub issueYou can enable c# 8.0 and Nullable reference types with dotnet core 2.2 . Just add lines below to the project file:
<PropertyGroup>
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<!-- NullableContextOptions will be replaced by Nullable in dotnet core 3.0 -->
<NullableContextOptions>enable</NullableContextOptions>
</PropertyGroup>
Handling nullable is a very important part of this lib. I with it could work smoothly with the new “Nullable reference types”.
And I with this lib can support something like Option<string?>
.
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Nullable reference types
Nullable reference types refers to a group of features enabled in a nullable aware context that minimize the likelihood that your code causes ......
Read more >Working With Nullable Reference Types In C# 8.0
This article explains how to work with Nullable reference types in C# 8.0 and demonstrates how to use it in application development.
Read more >Nullable reference types in C# 8.0
Nullable reference types are a new feature in C# 8.0. They allow you to spot places where you're unintentionally dereferencing a null value ......
Read more >How to enable Nullable Reference Types feature of C# 8.0 ...
To enable Nullable Reference Types for all code in a project, add the following to its .csproj file:
Read more >Nullable Reference types in C# – Best practices
In C# 8, nullable reference types use the same syntax to give the option of declaring reference types as nullable (i.e. allowing a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, it’s on my list 😃
Just my 2 pence: I like the library features for
Option<T>
especially things like LINQ support (bind
). C# 8 will make nullables safer but I personally think that I want to stay withOption<T>
. This way I can use e.g.Sequence
andTraverse
in a very generic way.I guess it will be very hard to make
T?
work likeOption<T>
. Maybe we could allow implicit casting fromT?
toOption<T>
and maybe back (?).