Releases: true-myth/true-myth-csharp
First Release: 1.0.1
True Myth C♯ is finally released. The primary change since Release Candidate 5 is the addition of an "algebraic" API that would allow users to use the C♯ pattern-matching facilities in an idiomatic way.
Binaries available via NuGet: https://www.nuget.org/packages/TrueMyth/1.0.1
1.0 Release Candidate 5
This is a refinement release. It does, however, contain breaking changes (albeit minor).
- Move
.UnsafelyUnwrap*
methods toTrueMyth.Unsafe
namespace. Described in the docs. - Rename
Result<T,E>.Unwrap
methods toUnwrapOr
andUnwrapOrElse
, respectively
Binaries available through nuget.org: https://www.nuget.org/packages/TrueMyth/1.0.0-rc5
This release should become v1.0. The only work slated for 1.0 that isn't in this is an update to how the documentation is generated and pushed to GitHub Pages, which isn't a functional change to the software. Stay tuned!
Relevant commit log:
-
Fix minor xref issues in docs; re-generate for RC5
Ben Collins - Tue, 8 Jan 2019 21:39:49 -0600 -
Move unsafe methods to .Unsafe namespace; closes #8.
Ben Collins - Tue, 8 Jan 2019 21:14:58 -0600Also: rename Result.Unwrap to be consistent with Maybe, as well as True Myth
Typescript -
Implement void Match; closes #23
Ben Collins - Tue, 8 Jan 2019 20:13:49 -0600 -
fix syntax error from bad merge
Ben Collins - Tue, 8 Jan 2019 11:42:54 -0600 -
Implements nullable conversions. Closes #26.
Ben Collins - Sun, 6 Jan 2019 16:05:48 -0600 -
IComparable/IComparable<T> implementation (#27)
Ben Collins - Sat, 5 Jan 2019 15:45:18 -0600- release conditions / variable didn't work as expected; use Pipelines release
instead - [wip] icomparable updates
- Complete IComparable implementation; closes #22
- fix broken step
- release conditions / variable didn't work as expected; use Pipelines release
1.0 Release Candidate 4: The C♯ening.
Overview
This is a major release for True Myth C♯, despite the fact that it's still a pre-release. There are major breaking changes from RC3. The API has come within spitting distance of parity with Typescript True Myth, and we now have cross-platform support via .NET Standard, as well as a basic level of test coverage.
Binaries are available on NuGet.org: https://www.nuget.org/packages/TrueMyth/1.0.0-rc4
Summary of Changes to API
The changes to the API are sweeping, so it wouldn't do to try to list them all here. Instead, they are all now documented online. Please see that documentation for details.
In general, the changes can be characterized as a re-casting of the previous port of True Myth for Typescript into C♯ but with a more native, idiomatic feel. For example, as of 1.0.0-rc3 (available on NuGet.org today), a Maybe
would be used like this:
var maybeThing = MethodThatProducesAMaybe();
if (maybeThing.IsJust())
{
var thing = maybeThing.UnsafelyUnwrap();
DoSomethingWithTheThing(thing);
}
else
{
Logger.Trace("The thing was nothing.");
}
In 1.0.0-rc4, you could do this a bit differently (and there are several ways to go about it, rather than just one as in RC3):
var thing = MethodThatProducesAMaybe().Unwrap(default(Thing));
DoSomethingWithThing(thing);
There are similar changes for Result
: maybe helper methods can help you do things semantically instead of being forced to resort to .UnsafelyUnwrap()
as is the case with previous versions.
But wait! There's much, much more. Also notably, there are now implicit conversion operators for Maybe
and Result
that allow you to use these types directly where before you had to unwrap them:
Maybe<Thing> MethodThatProducesAMaybe()
{
var thing = GetAThing();
return thing; // equivalent to `return Maybe.Of(thing)`
}
There are a few more goodies coming for RC5 and then hopefully a real 1.0 release. Feedback is of course welcomed; appropriate channels include:
- GitHub issues to file bugs or feature requests
- @aggieben on Twitter or by email (look in the GitHub profile)