CommandLine.Immutable and CommandLine.Immutable.LangExt #1552
micmarsh
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've found myself creating a lot of command-line tools lately, and while Microsoft's own System.CommandLine provides a lot of very good primitives, they are a bit low-level, as evidenced by the numerous wrappers others have written for it.
Many of those wrapper libraries model programs as classes with magic attributes added, and hopefully many of you reading this can agree that modeling programs (or just about anything, for that matter!) by composing immutable data structures is a far superior alternative. Hence, I wrote my own
System.CommandLinewrapper: https://github.com/micmarsh/CommandLine.ImmutableThe idea started as "what if I wrote a LanguageExt wrapper for System.CommandLine", but it turns out the main idea I'm bringing to the table (type-safe composition of immutable data structures) doesn't require LanguageExt at all, so the library has a "base version" and "LanguagExt version" that extra (but essential) goodies like
IO-based actions,Optional arguments, and other helpers.Please check it out if you have any desire to write command-line applications in .NET in a more functional way! Documentation is currently very sparse, but there are a couple of examples included and I'm always here (or there) to answer any questions.
Beta Was this translation helpful? Give feedback.
All reactions