typelevel / cats

Lightweight, modular, and extensible library for functional programming.
https://typelevel.org/cats/
Other
5.26k stars 1.21k forks source link

algebra.ring.Semiring conflicts with Wikipedia Semiring definition in that it lacks a `one` element #4664

Open benhutchison opened 1 month ago

benhutchison commented 1 month ago

The term Semiring is overloaded in Mathematics. . Cats uses an older terminology, where what Cats calls rig many people call Semiring.

NLab: "nowadays the primary definition of semiring used is the fourth [ie wikipedia] definition"

If there was ever a rebuild of Cats, I argue it should align with Wikipedia and nLab terminology. I also personally prefer this formulation which makes Semiring more powerful since it gives access to the one element.

johnynek commented 1 month ago

IMO given that there isn't a well known standard and only o a matter of years trends may have changed we shouldn't break binary compatibility to follow that new popularity.