Re:The type system is a programmer's best friend
by hgomersall on Saturday November 05, 2022 @02:00PM
(#33483926)
I'm happy to admit I'm wrong on that. My understanding is the bit that makes (kg.m)/s^2 type equivalent to a N, equivalent to J/m is not implementable in the same generic way.
Re:The type system is a programmer's best friend
by pencilguin on Saturday November 05, 2022 @04:42PM
(#33485460)
All unit systems decompose each unit to primitives, that can then be aliased for notational convenience. So, a result of J/m decomposes the same as a N.
Mind expanding on that? Because what that readme there shows is absolutely possible in C++, I have used a similar system for dealing with natural units.