Fighting Complexity in Software Development
I&#x27;m sure this is partly because I don&#x27;t read F#, but it looks like they&#x27;ve moved all the complexity into meta-programming madness, this is just being way to clever to play code golf at a high level, this is exactly the sort of complexity we should be fighting against.<p>Even the initial c# version was over complicated. The complex fluent interface with lambdas and callbacks could be done with a few if statements that would be simpler, faster and require no knowledge of the FluentValidation library. Unnecessary getters and setters to satisfy the encapsulation gods.<p>If you want to fight complexity got back to basics, you can have a static method returning a validation result with code like this:<p><pre><code>  if (!string.IsNullOrEmpty(card.CardNumber) &amp;&amp; CardNumberRegex.IsMatch(card.CardNumber))
    validations.add(&quot;Oh my&quot;);
</code></pre>
Converting if statements to more elaborate constructs is creating complexity not fighting it.