it is a pain to do bitwise operations currently
# science
b
it is a pain to do bitwise operations currently
a
Could you give an example? In all years, I did not find more than a few places where bitwise operations are needed and in those cases 'or' instead of | is fine
b
working with flags, working with binary formats
talking to c libraries especially that make heavy use of flags
a
Binary formats are usually in capsulated and do not require more than shl. For flags it is better to use something like a bitset.
Multiplatform bitset would be nice, but it easy to add it on the library level.
Native already has a bitset, it seems
b
That's right I always forget about those bitsets
a
Jvm has its own bitset. A bit more advanced if I remember correctly.
i
I hope you've seen my awesome example of abuse of them:
out << "hello world << lineSeparator()
And it's actually a major reason not to submit them