On (21/05/08 12:06), markus schnalke wrote: > To: dwm@suckless.org > From: markus schnalke <[EMAIL PROTECTED]> > Subject: Re: [dwm] using bitaray for tags (PATCH) > Mail-Followup-To: dwm@suckless.org > User-Agent: Mutt/1.5.13 (2006-08-11) > Reply-To: dynamic window manager <dwm@suckless.org> > List-Id: dynamic window manager <dwm.suckless.org> > > Premysl Hruby <[EMAIL PROTECTED]> wrote: > > > > This is realization of Gottox's proposal discuted on IRC today. > > It handles tags not as Bool [], but as bit-array saved in int. > > I read, that bit-arrays are not very portable between different > architectures. (It was in "The practice of programming", I think) > > Maybe this is not relevant here; also I cannot recall the exact > explanaition, why one should avoid it. > Please check if there is any thruth in that statement. > > > Second, I want to mention, that bit-shifts might look really leet, but > _do_ obfuscate, what could be written much more clearly! > > Please stick to _clear_ code. > > > meillo
That's the reason why i wrote it as macros. That bitops can also be written as inline functions, without any harm to binary size or performance. And yes, with bitarrays there are some portability issues. But asside of limiting number of possible tags, there's no portability downside for dwm, imho. (it will compile, but maximum of tags is architecture dependent) -- Premysl "Anydot" Hruby, http://www.redrum.cz/