These are chat archives for non/algebra

5th
Jan 2017
Denis Rosset
@denisrosset
Jan 05 2017 04:17
By the Group[G].empty example I meant the following. When aligning algebra to cats, the identity element was renamed the empty element. This makes perfect sense when dealing with monoids such as list or concatenation, but renders group theoretical code difficult to read. For me this is not a big deal, as avoiding typeclass fragmentation is my number #1 goal. By not having the syntax in algebra, I can implement my own infix/postfix operators, as you defined.
While typeclass fragmentation is extremely bad (see the scalaz/cats split), syntax fragmentation is not a big deal for me, as it does not impair interoperability.
Still, I understand your viewpoint: algebra should have a syntax on its own and not depend on cats or spire to provide it.
But for me, the first and foremost goal is to preserve binary compatibility at all costs, even across minor releases. Algebra is simply too low on the dependency chain to afford to break all the libraries that depend on it at every minor version bump.
Denis Rosset
@denisrosset
Jan 05 2017 04:32
(I'd like to have algebra syntax optional - i.e., nothing in companion objects - and possibly in a separable JAR)
Ben Hutchison
@benhutchison
Jan 05 2017 05:16

The syntax module would carry a dependency on cats-core (for the reasons described above), and it would only "make sense" if Spire reused it. So the dependency on cats core would extend to Spire.

By not having the syntax in algebra, I can implement my own infix/postfix operators, as you defined.

Re above, I don't think syntax in algebra would or could compromise your ability to enrich Group with an id alias for empty if desired. The kind of syntax Im proposing would enrich data values (only) with typeclass operations