David Teller: Units of Measure in Rust with Refinement Types |
Years ago, Andrew Kennedy published a foundational paper about a type checker for units of measure, and later implemented it for F#. To this day, F# is the only mainstream programming language which provides first class support to make sure that you will not accidentally confuse meters and feet, euros and dollars, but that you can still convert between watts·hours and joules.
I decided to see whether this could be implemented in and for Rust. The answer is not only yes, but it was fun :)
Комментировать | « Пред. запись — К дневнику — След. запись » | Страницы: [1] [Новые] |