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

I agree for most things, not sure about the bitmap though. I'm not a golang user, but from what I know it doesn't have operator overloading, so you can't make a more elegant solution with proper types. Considering this, bitmaps are fairly readable and let you do things like easy comparisons without writing tons of && or ||.

As long as they are declared as enums or similar, I don't see the problem (IIRC the iota keyword let's you do something like FLAG = 1 << iota;).



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

Search: