On 5 September 2016 at 09:25, FRIGN <[email protected]> wrote: > On Mon, 5 Sep 2016 07:42:36 +0200 > Anselm R Garbe <[email protected]> wrote: >> Quick note: your syntax usage of sizeof is not 100% accurate. >> >> Use 'sizeof(type)' with brackets but 'sizeof var' without. > > I use sizeof always function-like and see no reason why I shouldn't use > "sizeof(var)" and instead use "sizeof var". It doesn't alter the code > behaviour and ultimately it's all about readability. > If you eyes have become accustomed to always use function-like syntax > for such operators the best bet is not to break this style because it's > not "necessary" to have parentheses for variable sizeof's.
I disagree. Not using parentheses as sizeof arguments makes it pretty clear, that the expression is *not* about the size of a type, but rather needs to be evaluated. In dwm/dmenu code this has been respected until now for a very long time. I would keep this principle in place for other suckless tools as well. Cheers, Anselm
