FsToolkit.ErrorHandling
Optional
Our great sponsors
FsToolkit.ErrorHandling | Optional | |
---|---|---|
10 | 6 | |
444 | 875 | |
- | - | |
8.2 | 0.0 | |
21 days ago | 8 months ago | |
F# | C# | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
FsToolkit.ErrorHandling
-
Type setup for effortless error handling with the Result type
Isn't this similar to what https://github.com/demystifyfp/FsToolkit.ErrorHandling does?
-
It seems like I'm forced to make this choice at least once a day
I do think at least some of FSToolkit.ErrorHandling should be part of the core library though, it has nearly everything you could want for using these types.
-
How do I compose the functions with the following signatures?
I'm having trouble following exactly what you're trying to do, but it would probably be easier if you used the builtin Result type in conjunction with FsToolkit.ErrorHandling. The library provides many useful combinators as well as a result, option, and resultOption computation expression.
-
Dealing with workflows in F#
Also shout out to the wonderful FsToolkit.ErrorHandling library, it simplifies working with these so much.
-
F# 6 Hopes and kind of a rant
Monad stacks, most commonly Async>, require a lot of boilerplate to deal with or using something like https://github.com/demystifyfp/FsToolkit.ErrorHandling . Which is fine, but it causes dependency mismatches between libs or type mismatches as everyone is implementing their own. A language solution would be nice...
- FsToolkit.ErrorHandling 2.5.0 Released π
- FsToolkit.ErrorHandling 2.4.0 Released π
- FsToolkit.ErrorHandling 2.3.0 Released π
- FsToolkit.ErrorHandling 2.2.0 π
-
Say hello to "block" - the recently finalized name for the upcoming immutable array type
This library is nice: https://github.com/demystifyfp/FsToolkit.ErrorHandling
Optional
-
Nullable vs Option
Since then C# introduced nullable which takes away some of the needs for a Option type. So what is your opionion? Do libraries like Optional still have a place when nullable is enabled?
-
It seems like I'm forced to make this choice at least once a day
Optional is my go-to for c# (you could also use the F# Option of course but pulling fsharp.core into a C# project tends to raise eyebrows in my experience)
-
Common C practice to avoid in C++
This library provides similar functionality to F#'s Option type. I can't vouch for it, but it's there.
-
Why GoLang supports null references if they are billion dollar mistake?
Not really. C# doesn't have monads but you can easily add something like https://github.com/nlkl/Optional which is great for a team familiar with option types and IMO will lead to a more productive team with a more concise code base.
-
How do you handle EF Core null return values in your projects?
You can use Optional
-
How to get rid of NullPointerException
The option type is a different way to represent an optional value. This type asks if a value exists and, if so, accesses the value. When trying to access the value which doesnβt exist, it raises an exception. This solves the problem of NullPointerException raised in code areas away from the bug. In Java there is the Optional class. In C# (until C# 7 ) there is the Nullable type which is only for value types but you can create your own or use a library.
What are some alternatives?
ply - High performance System.Threading.(Value)Task computation expressions for F#
language-ext - C# functional language extensions - a base class library for functional programming
visualfsharp - The Visual F# compiler and tools
JFlepp.Maybe - A Maybe type for C#, aimed as an idiomatic port of the option type in F# to C#
VisualFSharp - The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio
Curryfy - Provides strongly typed extensions methods for C# delegates to take advantages of functional programming techniques, like currying and partial application.
Fable: F# |> BABEL - F# to JavaScript, TypeScript, Python, Rust and Dart Compiler
MoreLINQ - Extensions to LINQ to Objects
fslang-suggestions - The place to make suggestions, discuss and vote on F# language and core library features
Optuple - .NET Standard Library for giving (bool, T) Option-like semantics
NullGuard - Adds null argument checks to an assembly
FParsec.CSharp - A thin C# wrapper for FParsec.