Heya everyone –
I’ve written a blogpost based on a recent experience adding typesafety to the pmmd
codebase – handling a lot of different data and functions that needs to be combined in the right ways.
In it I make use of phantom types and OCamls module system to express the invariants - which I find is a nice set of typesystem features to express complicated relations in a relatively simple but efficient and scaleable way. Also, I think interesting design patterns can emerge from this way of working.
Let me know here if you have any questions or comments
Thanks (: