News for hackers. Stuff that matters.
Re:PEP 584 – Add + and – operators to the built-in dict class by endgame on Wednesday March 06, 2019 @06:31AM (#19318096)
Unfortunately, even in Haskell Data.Map.Map's monoid instance is left-biased. There is the monoidal-containers package which newtype-wraps Data.Map.Map to have instance Monoid m => Monoid (MonoidalMap k m), which I think is much more sensible.
Re:PEP 584 – Add + and – operators to the built-in dict class by dan-robertson on Wednesday March 06, 2019 @03:05PM (#19322248)
I think I wasn’t even sure that Haskell had a Monoid instance for Data.Map, I knew it wasn’t the interface which I would naturally expect though. I agree that the interface for MonoidalMap is more natural.
Re:PEP 584 – Add + and – operators to the built-in dict class by sametmax on Wednesday March 06, 2019 @07:10AM (#19318275)
Besides, anytime somebody compare Python to Haskell, the battle is over. They have completly different use cases and philosophy. If you want something in Haskell, you probably want the opposite in Python.
Re:PEP 584 – Add + and – operators to the built-in dict class by mjburgess on Wednesday March 06, 2019 @07:26AM (#19318351)
Its not clear what you're saying here.

The comparison was to say, "this decision is difficult everywhere" -- which lang seems beside the point.