This is exactly why I prefer Monoid over Semigroup. Having a law-abiding identity eliminates all sorts of corner caseshttps://twitter.com/carnivorous8008/status/871924374567231488 …
-
-
Replying to @GabrielG439
Doesn’t it depend on context? Aren’t there instances where semigroups can also eliminate edge cases? E.g.: Validation (NonEmpty String) a
1 reply 0 retweets 2 likes -
Replying to @stephencelis
I don't have a good answer for the case of Validation
1 reply 0 retweets 0 likes -
Replying to @GabrielG439 @stephencelis
It's the Applicative (Validation e) instance, originally in the paper gives Monoid e => which is problematic, and amended to Semigroup e =>
2 replies 0 retweets 0 likes -
Replying to @dibblego @GabrielG439
Sorry I figured
@GabrielG439 was familiar. It makes me wonder if there is a dual preference for Semigroup for where he prefers Monoid.3 replies 0 retweets 0 likes
I am firmly in favour of the existence of Semigroup. Too many practical problems otherwise, and I reject the counter-arguments outright.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.