Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Oh wow, that's so similar! So similar in fact, that I must have seen this blog post at some point and internalized the idea :)

The improvement that Badge<T> makes is the <T> part; you don't need to look up the PassKey declaration to see who can construct PassKeys, it's encoded right there in the type instead.

I do like how PassKey makes the copy ctor private. I think we can improve on that and delete both the copy and move ctors in Badge.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: