[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: boolean operators
- From: askok@...
- Date: Thu, 21 Sep 2006 22:27:36 +0300
We all know that.
What's wrong with the function-kind approach, is it gets
very tedious if your application area uses them a lot.
Especially, if the API you're using uses them a lot.
On Thu, 21 Sep 2006 15:18:54 -0400
Glenn Maynard <firstname.lastname@example.org> wrote:
On Thu, Sep 21, 2006 at 12:21:13PM +0100, Paul Hudson
Bitwise operations would come in very useful for doing
interesting things on
phones (implementing some Internet protocols, munging
as has previously been mentioned)
You don't need bitwise operators to get bitwise
operations, though. What's
wrong, in your case, with having them as functions?
netmask = math.or(netmask, 0x000000FF)
doesn't seem any worse to me than
netmask = netmask | 0x000000FF
flag = math.set(flag, 10)
is actually clearer, in my opinion, than
flag = flag | (1<<10)