SciNim / Unchained

A fully type safe, compile time only units library.
https://scinim.github.io/Unchained
110 stars 0 forks source link

Quantities from a declarative macro #23

Closed Vindaar closed 2 years ago

Vindaar commented 2 years ago

This is a further step towards #8.

Instead of manually writing all quantities, the "type classes" of them and the QuantityKind enum, we now generate everything related to that from a single macro call. It's one more step towards a more general approach to define units systems.

The next step from here (as "outlined" in the updated 'thoughts' org file) is a declarative approach to the units themselves. This will save significantly more work than the quantity part.