Using Haskell's 'newtype' in C

from blog Posts on Made of Bugs, | ↗ original
A common problem in software engineering is avoiding confusion and errors when dealing with multiple types of data that share the same representation. Classic examples include differentiating between measurements stored in different units, distinguishing between a string of HTML and a string of plain text (one of these needs to be encoded before...