RE: https://mastodon.social/@wingo/116040984561569645

isn't it nice when people learn stuff by hard experience and then write it up well?

@regehr "If you represent all of these concepts with size_t or uintptr_t or whatever, you’re going to have a bad time."

I love how understated that line is.

@SnoopJ single-element structs to get that little bit of typechecking in C and C++ is one of my totally favorite things
@SnoopJ they could have made typedefs into actual types but instead they're just little fuck yous
@regehr strong-ish typing
@SnoopJ @regehr I'm sure there's something similar in boost or somewhere but I have, for just these reasons in C++, a small templated StrongType<T> zero-cost wrapper that does just that for a primitive type T (and a few extra things to make selected interop easier, so you can make two StrongType<T> that will interoperate with each other but not with other StrongType<T> etc)