The repo includes a DESIGN.md file that describes the design motivations for the library, and it's definitely worth reading. It goes through a few really powerful techniques for writing misuse-resistant APIs, and I think some of its advice is applicable to good software engineering in general.<p><a href="https://github.com/google/mundane/blob/master/DESIGN.md" rel="nofollow">https://github.com/google/mundane/blob/master/DESIGN.md</a><p>In particular, their use of the type system to expose opaque types that only allow meaningful operations on them is something that I've seen used to great effect in other statically typed languages, like Haskell.