Re:Show HN: Numbat – A programming language with physical di...
by openquery on Thursday November 16, 2023 @11:42AM
(#38291767)
And the equivalent uom in Rust.
Re:Show HN: Numbat – A programming language with physical di...
by stiiv on Thursday November 16, 2023 @11:17AM
(#38291409)
Thank you for not resisting. F# is very hard to beat for a tight domain model.
Re:Show HN: Numbat – A programming language with physical di...
by nritchie on Thursday November 16, 2023 @01:35PM
(#38293532)
Or unitful.jl in Julia which evaluates the units at compile time resulting in no performance loss at runtime.
Re:Show HN: Numbat – A programming language with physical di...
by sharkdp on Thursday November 16, 2023 @02:39PM
(#38294350)
F# is the only language I looked at that has a really powerful unit system. The author of that unit system wrote his PhD thesis on the subject [1]. Numbat's type system is actually pretty close to what was suggested in that thesis (in contrast to F#'s system, which is based on units — not dimensions).
https://learn.microsoft.com/en-us/dotnet/fsharp/language-ref...