|
|
|
|
|
by kwon-young
324 days ago
|
|
This reminds me of the mp-units [1] library which aims to solve this problem focusing on the physical quantities.
The use of strong quantities means that you can have both safety and complex conversion logic handled automatically, while having generic code not tied to single set of units. I have tried to bring that to the prolog world [2] but I don't think my fellow prolog programmers are very receptive to the idea ^^. [1] https://mpusz.github.io/mp-units/latest/ [2] https://github.com/kwon-young/units |
|