On Tue, Aug 31, 2010 at 9:52 PM, Michael Jennings <[email protected]> wrote: > On Tuesday, 31 August 2010, at 20:52:13 (-0300), > Lucas De Marchi wrote: > >> Humn... yes, but at least for EFL, raster and barbieri told me that >> I should not trust the precedence and always use parenthesis. This >> was the reason why I made this patch. Not that I agree, but I think >> that having a common style in all svn (or at least all EFL) would be >> good. > > For the most part, I like the changes. The problem is that > parenthesizing standalone identifiers is pointless and definitely > doesn't help readability. The only place it makes sense to > parenthesize *that* fully is in macros, where something that appears > simple like "a" could actually be an expression, function call, etc. > Parenthesizing simple variables seems pretty silly to me. > > So I'm all for ((a || b) && c), but not (((a) || (b)) && (c)), if that > makes sense. > > Or, to take a concrete example from Eterm, I think this is good: > > - if (button->type == ACTION_STRING || button->type == ACTION_ECHO) { > + if ((button->type == ACTION_STRING) || (button->type == ACTION_ECHO)) { > > but this is bad: > > - if (drag && TermWin.screen && TermWin.screen->backend && > TermWin.screen->userdef) { > + if ((drag) && (TermWin.screen) && (TermWin.screen->backend) && > (TermWin.screen->userdef)) {
Talking about EFL... raster, k-s, any opinions? Otherwise I'll just drop this patch since there are some against it. Lucas De Marchi ------------------------------------------------------------------------------ This SF.net Dev2Dev email is sponsored by: Show off your parallel programming skills. Enter the Intel(R) Threading Challenge 2010. http://p.sf.net/sfu/intel-thread-sfd _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
