Doesn’t it depend on context? Aren’t there instances where semigroups can also eliminate edge cases? E.g.: Validation (NonEmpty String) a
-
-
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 -
Seems to me that preference shouldn't enter into it. Either that extra state should be representable, or not.
1 reply 1 retweet 1 like -
^ This person agrees. Why can't I use do-notation on (Writer (NonEmptyList x)) in Haskell ? I can even with Scala, and that's Scala!
2 replies 0 retweets 2 likes -
This is analogous to arguing "Why can't I use goto?" Sometimes forbidding functionality improves the code
1 reply 0 retweets 1 like -
I'm not using that argument. There is no code that improves by the non-existence of Semigroup (or Monoid or any other appropriate thing).
1 reply 0 retweets 1 like -
I disagree. I've worked with code that needlessly proliferated corner cases due to weakening Monoid to Semigroup
2 replies 0 retweets 0 likes -
I'd love an example of this. How do you get more corner cases when you can represent fewer states? I don't get it.
1 reply 0 retweets 2 likes
I too, am deeply sceptical.
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.