
Existential.Net
The library for things that may or may not exist
Introduction
Existential is a utility library that contains parameter validation methods, a Maybe monad, and more. It can be used to work effectively with nulls, to efficiently resolve Code Analysis issues CA1062 and CA2000, to help generate a hash code, and to convert the names of generic types into a familiar string representation.
It reduces the code you need to write for basic null checks by providing validation techniques or - even better - using the Maybe<T> monad can just help you not to care!
Other classes in Existential help you to avoid constantly reinventing the wheel for common problems such as generating hash codes, safely returning disposable values from methods, and converting an IEnumerable to an IEnumerable<T>.
These solutions aren't innovative in themselves - plenty code examples exist out there - but Existential brings them together into one tested library so you don't have to.
To get started:
What can I do with Existential.Net? || API Documentation || Access the code
About the icon
Existential's icon is made up of two symbols from predicate logic:
- ∃ (there exists) and
- ∄ (there does not exist)
These are the two existential quantifiers , and capture the essence of what the Existential library is about.
About the author
Gavin Greig's been a professional software developer since 1992, and a .NET developer since 2004. Existential.Net's the crystallisation of his experience of finding the bits he wishes weren't missing from .NET, often unearthed with the help of static code analysis tools.
Acknowledgements
The implementation of the Maybe<T> monad is based on a couple of articles for DotNetCurry by Yacoub Massad:
I've been meaning to write a version of the Maybe monad and put it in a library wih some of the other things here for years, but might not have got it done if it weren't for Yacoub's previous work and the lockdown for COVID-19 giving me a little extra time!
My friend and former colleague Alan Graham helped with spotting some of the errors I'd made so now there are fewer of them. Any that are left are my fault.