Comments (7)
@DavidArno thanks for pushing this forward! I put together the markup for the documentation of the Union.Value<TResult>
method. Let me know if I can help out with anything else there.
Imperative Use
As an alternative to using a union in a functional style, its value can be directly accessed by more traditional, imperative style C# code. One method and three read-only properties are provided for this purpose:
Value
public TResult Value<TResult>()
Returns the value of the union directly. If the value of the union is not of the TResult
type, an InvalidOperationException
will be thrown.
Case
public Variant Case { get; }
Returns Variant.Case1
if the value is of T1
or Variant.Case2
if the value is of T2
.
Case1
public T1 Case1 { get; }
If Case
is Variant.Case1
, this will return the value held by the union. Otherwise an InvalidOperationException
will be thrown.
Case2
public T2 Case2 { get; }
If Case
is Variant.Case2
, this will return the value held by the union. Otherwise an InvalidOperationException
will be thrown.
from succinct.
@DavidArno is there any way we can help with any of the remaining tasks? We're trying to use the Case<>
method sooner rather than later, but we'd rather not fork the repo in our private nuget feed.
from succinct.
Yes. Count me in if you want help to complete this release. Not sure if I can really be helpful but we can discuss about it together.
from succinct.
My apologies for the huge delay. I have been tied up in a major house renovation for the last few months and will continue to be tied up until the end of March. As such, I've not really been able to devote any time to SuccincT. However, checking things, I realised that all that was holding up the release was documenting the cons pattern matching. So I've decided to leave that unfinished and release v3.1. It should appear on the nuget server in the next hour or so.
Once again, apologies for the delays.
from succinct.
Oh and thanks to you both for your offers of help. Knowing that people cared that much spurred me on to putting a bit of effort in to getting v3.1 out. Thanks, both.
from succinct.
No problem, @DavidArno, things look good here!
from succinct.
@DavidArno I hope you're fine. Can we plan a release date for 4.0?
from succinct.
Related Issues (20)
- Generic ValueOrError HOT 3
- A non-exception Value<T> alternative for unions HOT 2
- Maybe.Some(null) does not throw and has a different behavior than Maybe.None() HOT 8
- SuccincT Roadmap HOT 12
- When will version 3.1.1 be published to NuGet? HOT 3
- Remove Maybe type and change Option to be a readonly struct HOT 5
- Checklist for the v4 release HOT 1
- As C# 7 now supports discards, the Ignore function is redundant and should be removed HOT 1
- As C# 7 now supports discards, the Ignore function is redundant and should be removed HOT 1
- Add pattern matching to the Either type HOT 1
- Runtime Exception of type System.IO.FileNotFoundException HOT 4
- Change enum parsers to use Enum generic constraint HOT 1
- Add positional pattern matching support to Option<T> HOT 1
- Add positional pattern matching support to ValueOrError types HOT 1
- Add positional pattern matching support to Success<T> HOT 1
- Add positional pattern matching support to Either<TL,TR> HOT 1
- Add positional pattern matching support to Union types HOT 1
- Investigate adding cons support for async streams
- Remove the use of <T> at the end of Succinc<T>
- Create a new release of SuccincT, targeting .NET 6, with all the redundant features removed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from succinct.