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)
@regehr good article, although the comment section was a little strange in a somewhat unusual way:
@geofflangdale wow I didn't see that. but, back when I blogged I did often have to delete the odd comment like that.
@geofflangdale as you well know, this stuff happens when twitter gets ahold of your post