[Pharo-project] I really miss a binary bitOr: selector for integers
Hello, C world using bitor-s extensively for passing various flags and options. And porting the code looks really awful with #bitOr: , because it requires braces when you combining more than 2 flags. Can we , please , please, include #| as an alternative selector for bitor-ing integers into a kernel? Btw, Alien alredy adds it as extension. But i would really like to get it into the core, so any other may use it. Meanwhile, i defined own awfull extension selector - #++ -- Best regards, Igor Stasenko AKA sig.
On 5/17/2010 6:26 PM, Igor Stasenko wrote:
Hello, C world using bitor-s extensively for passing various flags and options.
And porting the code looks really awful with #bitOr: , because it requires braces when you combining more than 2 flags.
Can we , please , please, include #| as an alternative selector for bitor-ing integers into a kernel?
+1. But then we also need #& and something like #not. So that I can simply write: setFlag: aBool flags := aBool ifTrue:[flags | FlagConstant] ifFalse:[flags & FlagConstant not].
Btw, Alien alredy adds it as extension. But i would really like to get it into the core, so any other may use it.
Meanwhile, i defined own awfull extension selector - #++
Eeeeeek! :-) Cheers, - Andreas
participants (2)
-
Andreas Raab -
Igor Stasenko