greggyb,
@greggyb@mastodon.sdf.org avatar

I came up with a thing in today and I am unsure about it. I don't know if it's cute, useless, or useful; I cannot see far enough ahead to understand its implications.

type ErrExn = | Err of DomainError | Exn of System.Exception

This DU unifies domain errors (that are represented in a user-written DU) and exceptions.

I'd expect it to be in a function with a signature of 'a -> Result<'b, ErrExn>.

I don't know if this gives value over separate domain errors and exceptions.

Thoughts?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • anitta
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • provamag3
  • tester
  • Leos
  • megavids
  • JUstTest
  • All magazines