bugsmithA to Programming · 1 year agoIntroducing Numbat: A programming language with physical units as typesnumbat.devexternal-linkmessage-square23fedilinkarrow-up1165arrow-down17
arrow-up1158arrow-down1external-linkIntroducing Numbat: A programming language with physical units as typesnumbat.devbugsmithA to Programming · 1 year agomessage-square23fedilink
minus-squareStarfighter@discuss.tchncs.delinkfedilinkarrow-up3·edit-21 year agoI can’t talk about the other libraries but the uom crate does the same thing. The dimensions are encoded as a vector of generics, allowing you to get the correct unit even when dividing a distance by time for example. It’s quite the clever use of Rusts type system.
I can’t talk about the other libraries but the uom crate does the same thing.
The dimensions are encoded as a vector of generics, allowing you to get the correct unit even when dividing a distance by time for example.
It’s quite the clever use of Rusts type system.