3
azuredivay
333d

I miss bit-flags 😪

Comments
  • 3
    They haven't gone anywhere unless you or your employer decided to stop using for some reason
  • 4
    I don’t. If speed and size is not an issue, a Set data structure is much more convenient than having to deal with bit shifting and bitwise operations.
  • 2
    They're quite nice, i use 'em to communicate with the rendering pipeline and pack directional context data in my current project
  • 3
    @asgs they're still there, but as Lensflare said, they're obsolete now for majority of work-cases

    saving a byte in DB or even in memory, doesnt make any difference now
  • 3
    @Lensflare yep, but still, the thrill of compacting SO MUCH into just a byte in DB was fun

    using them now, even on server side code is flagged for unreadibility, plus the benefits are negligible
  • 3
    @thebiochemic in rendering you still get to make the most of the resources at hand

    no longer a luxury for network-related projects where even the DB is across subnets

    But yep, they're fun af 😩😩😩
  • 3
    https://docs.rs/packed_struct/...

    I reckon you can fill one with bools and get all the performance with none of the code smells.
Add Comment