Wednesday, August 14, 2013 [Tweets] [Favorites]

Type-Safe Scalars With Single-Field Structs

Mike Ash:

An interesting feature of C structs is that structurally-identical structs are still different types. […] This fact gives us the tool we need to create new types rather than simply creating new names for existing types.

And there’s no overhead at runtime.

Comments

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment