News for hackers. Stuff that matters.
Re:Not Growing a Language by fiddlerwoaroof on Saturday April 03, 2021 @05:54PM (#26685084)
Concatenation is just addition, though: addition is the monoid operation on numbers with the identity of 0, concatenation is the monoid operation on lists with identity of [].

The problem is almost always not the overloading of + but the implicit type coercion rules

Re:Not Growing a Language by gowld on Saturday April 03, 2021 @10:02PM (#26686347)
List[Int] has more than one monoid
Re:Not Growing a Language by fiddlerwoaroof on Saturday April 03, 2021 @11:06PM (#26686584)
But, when I'm thinking in List[Any], I expect to be working on the Monoid for List[Any], not the Monoid for List[Int]: things like special-casing List[Int] are exactly what make programming languages difficult to learn and use.