Wednesday, August 14, 2013

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 RSS · Twitter

Leave a Comment