I took at the Bitwise module and I was wondering: why are the named operators implemented as macros? I understand why this is the case for infix operators (&&&
, |||
, etc.) But it doesn’t seem necessary for the named operators like band
and bor
.
I’d imagine it is to save a function call for likely low-level need-to-be-fast math operations, so it just replaces its call directly with the BEAM erlang call.