Get the latest tech news

Fault Report – and alternative to Result in F#


Thoughts on software development and sundry other topics

If the caller wanted to programmatically “react” in some smarter way, they don't really have any additional information with which to work (unless they start trying to carve the error string... but that's a quick trip to the land of madness). In order to enforce it, we need to rethink our discriminated union slightly ( pay close attention to the generic constraints-- it's really the linchpin of the whole approach): Now, in practice, this approach would also benefit from many more supporting functions ( bind, bindFault, et cetera), a few additional commonly-wanted type definitions (eg: Demotion, CompoundFault), and possibly even a computation expression.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of result

result

Photo of Fault Report

Fault Report

Related news:

News photo

London Bus Crashes Are the Result of an Unsafe Model

News photo

Games industry layoffs not the result of corporate greed and those affected should "drive an Uber", says ex-Sony president

News photo

UK government to probe ‘dynamic’ pricing behind Oasis ticket price surge — Cost jumped by hundreds of pounds during online sale as a result of Ticketmaster pricing system