• Авторизация


David Teller: Units of Measure in Rust with Refinement Types 17-01-2020 15:35 к комментариям - к полной версии - понравилось!


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 :)

https://yoric.github.io/post/uom.rs/

вверх^ к полной версии понравилось! в evernote


Вы сейчас не можете прокомментировать это сообщение.

Дневник David Teller: Units of Measure in Rust with Refinement Types | rss_planet_mozilla - Planet Mozilla | Лента друзей rss_planet_mozilla / Полная версия Добавить в друзья Страницы: раньше»