Parse, Don’t Validate AKA Some C Safety Tips
17 points by telemachus
17 points by telemachus
I also use something like this when writing C. This is pretty much the "strongly typed aliases" or "newtype idiom" that other languages folks talk about, so I don't even think too much about it. The original "Parse, Don't validate" article goes way beyond that.
Also, I don't think it is worthwhile to hide struct definitions in source files if the cost is needing to malloc/free.