3 ms·
> class Semigroup a => Monoid Yes, hence the "at least a few years ago". But perhaps I'm misremembering and confusing it with applicative functors, it has been
by crote 5mo ago
> class Semigroup a => Monoid
Yes, hence the "at least a few years ago". But perhaps I'm misremembering and confusing it with applicative functors, it has been a few years.
> I guess they went with a non-breaking feature introduction.
Sure, but functors aren't exactly novel, are they? Although it has contributed a lot to programming language design in general, Haskell didn't exactly invent the concept of a generic "map". So why wasn't it there in the first place, and why was it - despite its obvious prominence - not deemed important enough for a (what seems to be tiny) breaking change?
> Anyway, it could be worse. You could be working in a language that can't even express the functor/map interface.
Are those still around? I thought even Go eventually started supporting generics?
- mrkeen 5mo ago"Generics" doesn't cut it. Most languages just can't functor. Go - no. https://www.reddit.com/r/golang/comments/v1ljep/monads_and_popular_fp_abstractions_based_on_go/ https://www.reddit.com/r/golang/comments/v1ljep/monads_and_p... Swift - no. https://forums.swift.org/t/higher-kinded-types-monads-functors-etc/4691 https://forums.swift.org/t/higher-kinded-types-monads-functo... Rust - no. https://www.reddit.com/r/rust/comments/152bgj0/current_state_of_functors_fmap_in_rust/ https://www.reddit.com/r/rust/comments/152bgj0/current_state... "Awkward fmap" and "random collection of category theory concepts thrown together in a weekend" is great compared to the alternatives.