<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Aaron Pina</title>
    <description>The latest articles on DEV Community by Aaron Pina (@aaronpina).</description>
    <link>https://dev.to/aaronpina</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3836832%2F5958cfbd-6c9f-4b42-b3d3-ecf81b774772.jpeg</url>
      <title>DEV Community: Aaron Pina</title>
      <link>https://dev.to/aaronpina</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aaronpina"/>
    <language>en</language>
    <item>
      <title>QuickResult: A Lightweight Result Monad with Full LINQ Query Syntax (Zero Dependencies)</title>
      <dc:creator>Aaron Pina</dc:creator>
      <pubDate>Sat, 21 Mar 2026 10:06:29 +0000</pubDate>
      <link>https://dev.to/aaronpina/quickresult-a-lightweight-result-monad-with-full-linq-query-syntax-zero-dependencies-3046</link>
      <guid>https://dev.to/aaronpina/quickresult-a-lightweight-result-monad-with-full-linq-query-syntax-zero-dependencies-3046</guid>
      <description>&lt;p&gt;I spent years writing monadic code under Paul Louth (the creator of language-ext) and got completely spoiled by how natural LINQ query syntax feels when working with Result types.&lt;/p&gt;

&lt;p&gt;When I moved on, I tried the popular options: FluentResults, ErrorOr, OneOf, but they all felt too heavy for everyday work. They force you into opinionated error objects, lots of boilerplate, or awkward chaining.&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;QuickResult&lt;/strong&gt;, a dead-simple, zero-dependency Result monad that gives you exactly what I missed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why QuickResult feels different
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Full LINQ query syntax (works with sync, async, and mixed pipelines in one expression)&lt;/li&gt;
&lt;li&gt;Error is just a plain &lt;code&gt;string&lt;/code&gt; (super easy to serialise at API boundaries or log)&lt;/li&gt;
&lt;li&gt;Zero dependencies, .NET 8+&lt;/li&gt;
&lt;li&gt;Tons of practical helper extensions for real-world use&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here’s what a mixed sync/async pipeline actually looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;Result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Success&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;// sync&lt;/span&gt;
            &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;GetValueAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;6&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;    &lt;span class="c1"&gt;// async&lt;/span&gt;
            &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;Result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;Success&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;// sync&lt;/span&gt;
            &lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="p"&gt;+&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kt"&gt;var&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Success(12)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Clean. Readable. No .Bind() hell.&lt;/p&gt;

&lt;h2&gt;
  
  
  Other helpers I added because I actually use them
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;WhenNull&lt;/strong&gt;, &lt;strong&gt;FailIfTrue&lt;/strong&gt; / &lt;strong&gt;FailIfFalse&lt;/strong&gt;&lt;br&gt;
Fallback with the &lt;strong&gt;|&lt;/strong&gt; operator&lt;br&gt;
&lt;strong&gt;Try&lt;/strong&gt; for exception-prone code&lt;br&gt;
&lt;strong&gt;ToResult&lt;/strong&gt; extensions for common types&lt;/p&gt;

&lt;h2&gt;
  
  
  The philosophy
&lt;/h2&gt;

&lt;p&gt;I deliberately kept the error type simple. No giant Error class you have to serialise at the edges of your API. If you ever need something richer later, you can easily wrap it, but for 90% of services and validation workflows, a clear string is perfect.&lt;/p&gt;

&lt;p&gt;v1.8 is now stable and feature-complete. I used functional style heavily in my previous roles and this library brings that same clean, explicit error handling back without any of the ceremony.&lt;/p&gt;

&lt;h2&gt;
  
  
  Give it a spin
&lt;/h2&gt;

&lt;p&gt;NuGet: &lt;a href="https://www.nuget.org/packages/QuickResult" rel="noopener noreferrer"&gt;https://www.nuget.org/packages/QuickResult&lt;/a&gt;&lt;br&gt;
GitHub: &lt;a href="https://github.com/aaroncpina/QuickResult" rel="noopener noreferrer"&gt;https://github.com/aaroncpina/QuickResult&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Would love honest feedback or PRs. If there’s a common use-case I missed, let me know! Happy to add more extensions.&lt;/p&gt;

&lt;p&gt;(And yes, I know native unions are coming in a future C# version. QuickResult is the practical bridge you can use &lt;em&gt;today&lt;/em&gt; while we wait.)&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>dotnet</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
