I have released v2.2 of Sodium for C#. There are only a couple changes, but one is a public API change, which is why I bumped the version to 2.2.
IMaybe<T> h
as been removed in favor of Maybe<T>
, which is now a struct
. This ensures that the Maybe<T>
variable itself cannot be null
. Also, it allows for an implicit conversion in the None
case such that Maybe.None
can be written without the generic type parameter and it will automatically be converted to the appropriate Maybe<T>
as needed.
The two constructors for Maybe<T>
are now named Some
and None
instead of Just
and Nothing
.
An Either
type has been added with anywhere from two to eight generic type parameters to allow for anonymous algebraic data types to be represented.
The code base has been converted over to VS2017/C#7. This should not have any effect on consumers of the package.
Roadmap:
I plan on putting out a Sodium 3.0 release at some point in the near future. The main change for Sodium 3.0 will be that I would like to rework loops so that they are more type safe. I believe that we can protect against loops that should not be able to happen with the type system, and I also plan on doing something similar to F# in the way looping is implemented now that C# has gained tuple deconstruction, making it more feasible.