2010/9/1 Michael Jennings <[email protected]>: > 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)) {
totally agree ! also this seem silly to me: if ((!a) || (!b) || (!c)) DaveMDS > > HTH, > Michael > > -- > Michael Jennings (a.k.a. KainX) http://www.kainx.org/ <[email protected]> > Linux Server/Cluster Admin, LBL.gov Author, Eterm (www.eterm.org) > ----------------------------------------------------------------------- > "Kyrie eleison down the road that I must travel. Kyrie eleison > through the darkness of the night. Kyrie eleison; where I'm going, > will you follow?" -- Mr. Mister, "Kyrie" > > ------------------------------------------------------------------------------ > 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 > ------------------------------------------------------------------------------ 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
