Can't find much about this in Arrow's PR history, ...
# arrow-contributors
y
Can't find much about this in Arrow's PR history, but perhaps I didn't look thoroughly enough. What was the reasoning behind deprecating Semigroup, Monoid, etc? I'm thinking of experimenting with them in
arrow-context
, but if there's strong rational for why they'd be bad, then it's probably not worth wasting time on it.
a
there are several intertwined reasons, but some of them are: • it deviated from Kotlin idioms: for example in
fold
your take empty value and combine function, not a single class containing both • since Monoid has two methods, it's not possible to use Kotlin's lambda-conversion feature, so the code looked even harder to understand • you had to pass the Monoid explicitly, even if you were using it in several place
🔝 1
it may be that the third problem is no longer present with context parameters, but I wouldn't put that much work on it either
y
Hmmmm. Semigroup could be interesting because it doesn't have those issues, but it's also really insignificant because passing a
combine
function really isn't a big issue at all. I think I'll pass on it for now :)
1