the.bay.news

Hundreds of newtypes versus worse API

Haskell Community
Hundreds of newtypes versus worse API
Hi there ! TL;DR Which is best and why ? Practice 1 : Lots of newtypes, but nice API newtype Second a = Second a deriving ( Show, Eq, Ord, Num, Fractional, Floating, Real, RealFrac, RealFloat) newtype Minute a = Minute a deriving ( Show, Eq, Ord, Num, Fractional, Floating, Real, RealFrac, RealFloat) newtype Gram a = Gram a deriving ( Show, Eq, Ord, Num, Fractional, Floating, Real, RealFrac, RealFloat) -- Hundreds of newtypes like this Practice 2 : One newtype, but ugly API newtyp...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.