Dimensions/Units of Measure
I was playing around with the NewType pattern in Rust by coding a set of length quantity types. As usual, that means a set of similar crates wandered into my view:
I was playing around with the NewType pattern in Rust by coding a set of length quantity types. As usual, that means a set of similar crates wandered into my view:
I stumbled across this blog post (https://steveklabnik.com/writing/rusts-golden-rule) a short time ago. The author spends a bit of time on a concept that is pretty much normal for compiled languages, and almost completely missing from dynamic languages: function signatures. In particular, he points out that Rust’s requirement that we are explicit about function signatures means that… Read More »
Interesting article describing some patterns for defining errors in Rust. I had found myself slowly moving in that direction for some of my code. This puts some useful concepts in a cleaner form.