@johnynek I have fixed up an old branch of @non that removes spire typeclasses and uses algebra typeclasses instead. https://github.com/rklaehn/spire/tree/topic/algebra-integration . Feedback welcome.

Any idea if this sort of aliasing has a performance impact?

Any idea if this sort of aliasing has a performance impact?

By the way: is there a reason there is no companion object for some typeclasses, e.g.

`IsIntegral`

and `MinMaxLattice`

? I noticed this when aliasing typeclasses from spire.
An odd question, but how much does everyone like

`IsReal`

/ `IsRational`

/ `IsAlgebraic`

/ `IsIntegral`

living in algebra?
There are some things in

`IsReal`

that could perhaps be factored out a bit
but many of these type classes I thought of as being a way to extract exact versions of possibly inexact types (eg each class can has a method to cast the underlying type to exact versions:

`BigInt`

, `Rational`

, `Algebraic`

and `Real`

)
obviously we lose those methods in algebra, since those types don't exist

but I think that we also lose a lot of utility at the same time, other than the ceil/floor/etc methods on

`IsReal`

(of course

`IsAlgebraic`

/ `IsRational`

don't exist in algebra, but it's sort of meant to be a hierarchy)
I think it depends on whether you think of Algebra as the intersection of Spire and Algebird (in which case they make sense) or as a foundation for Cats (in which case they don't).

I don't think Algebird has anything similar, so I don't think

`Algebird`

would be hurting without them
(this also makes me feel better about removing them)

Wouldn't having e.g.

`IsRational`

in algebra require having `Rational`

in algebra? Same for `IsAlgebraic`

/`Algebraic`

?
I definitely think that spire is the right place for things like

`Rational`

and `Algebraic`

.
@rklaehn Oh yeah, definitely not arguing that. I'm arguing that we should remove

`IsIntegral`

and `IsReal`

from algebra
since I don't think algebird uses them and they have been expanded in Spire to be more useful, but rely on Spire number types

@tixxit I don't see a big win for IsReal in algebra, but I don't object.

Also, I don't see algebra as the intersection of spire and algebird. For instance, there were many objects we didn't bother to add, some we wished we had, but didn't get around to (Commutative*), so I see it as a nice shared foundation.

Also, basically, algebird is used in a monorepo with tons of dependencies, so we are pretty concerned with binary compatibility especially on core things.

@milessabin well, that was the original discussion. Since then cats came on the scene, but my intent is to use algebra in algebird, but the binary compatibility requirements are pretty high for something that low it the stack at Twitter.