Skip to content

Add commonly known operators to algebra type classes #4795

@ldeluigi

Description

@ldeluigi

Currently, Spire is the only place where commonly known mathematical operators are provided to algebra type classes users.

For the general use case, writing custom algebraic types almost always means to also provide at least the most common operators (+, -, *, /) and often the less common ones (**, @, %, ...) to work with those types.

These operators implementation and behavior should be derived from the implemented type classes for a type, as they are standardized in their behaviour through many programming languages and DSLs.

Finally, I think that the full adoption of the algebra library for developers is hindered by the lack of these overloads, and many DSLs would benefit from the possibility to have also laws checking their correctness.

Let me know what you think!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions