I would not use the 'and'. The postfix if should only be use if the both sides before and after the "if" correpond to a simple statement (like the one you gave). Everything more complicated or longer should use the block form.
C. On Sun, Jul 17, 2011 at 12:07 PM, Zeno Gantner <zeno.gant...@gmail.com> wrote: > Hello, > > I would try to avoid the "and" variant. > > I am less decided on the statement modifier "if" variant vs. the > compound statement "if". > > The compound statement "if" is IMHO certainly the cleanest way to > express it, on the other hand it needs 2 more lines. > > Other opinions? > > Best, > Zeno > > On Sun, Jul 17, 2011 at 11:57 AM, Gabor Szabo <szab...@gmail.com> wrote: >> I was just looking at Padre::Wx::Main::save_current_session and how it >> is used and found 4 use cases: >> >> >> $self->ide->{session_autosave} and $self->save_current_session; >> >> >> $self->save_current_session if $self->ide->{session_autosave}; >> >> if ( $self->ide->{session_autosave} ) { >> $self->save_current_session; >> } >> >> $self->ide->{session_autosave} and $self->save_current_session; >> >> So that's 3 different of saying the same. >> >> I wonder what do you think, should we start working toward >> a single style in Padre? >> >> Gabor >> _______________________________________________ >> Padre-dev mailing list >> Padre-dev@perlide.org >> http://mail.perlide.org/mailman/listinfo/padre-dev >> > > > > -- > MyMediaLite Recommender System Library: http://ismll.de/mymedialite > _______________________________________________ > Padre-dev mailing list > Padre-dev@perlide.org > http://mail.perlide.org/mailman/listinfo/padre-dev > _______________________________________________ Padre-dev mailing list Padre-dev@perlide.org http://mail.perlide.org/mailman/listinfo/padre-dev