I wish I hadn't said that as it's confused this whole argument. When I was writing highly optimised assembler graphics code, then yes shifts were a good way of speeding it up, but I'd probably never do it in C++ and certainly not C# for the reasons mentioned.
But the question is assuming you know that << means a bit shift, then is it reasonable to assume that anybody with a basic knowledge of computers and how they work would know that bitshifting left on an integer value has the same outcome as multiplying by a factor of two? All code has to be written assuming a reasonable amount of knowledge on the part of a maintainer, and there are pleanty of other languages features that aren't used that often. How often do you use do...while? I bet not very often (neither do I), but would you be concerned about a programmer using that trick?
Code:
#define SETBIT(x,n) do {(x) |= (1u << (n)); more tulip here; } while(0)
#define CLRBIT(x,n) do {(x) &= ~(1u << (n)); more tulip here; } while(0)
#define FLIPBIT(x,n) do {(x) ^= (1u << (n)); more tulip here; } while(0)

Last edited:
17:11

then you may not have been offered the gig.