且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

F# 度量单位如何工作?

更新时间:2023-11-10 08:04:40

根据 响应 在下一篇相关博客文章中,它们是 F# 编译器中的纯静态机制.所以没有单位数据的 CLR 表示.

According to a response on the next related blog post, they are a purely static mechanism in the F# compiler. So there is no CLR representation of the units data.

目前不完全清楚它是否适用于非浮点类型,但从类型系统的角度来看,理论上是可能的.

Its not entirely clear whether it currently works with non-float types, but from the perspective of the type system it is theoretically possible.