[RCD] Codebase cleanup, PSR-1/2 compliance - and before you say no, I'm offering to do the work
stef.martin at gmail.com
Mon Sep 2 22:03:38 CEST 2013
"Roundcube, code proudly cleant by argumenting trolls"
On Mon, Sep 2, 2013 at 9:43 PM, Thomas Bruederli <thomas at roundcube.net>wrote:
> On Mon, Sep 2, 2013 at 9:20 PM, David Deutsch <skoremail at gmail.com> wrote:
> >> A proper and predictable process flow is something I learned to
> >> during my years as a software developer.
> > Sure, although I don't understand how my approach makes it any less
> > predictable. All I have done is fan out the if/elseif structures and,
> > arguably, that makes it easier to check through them. Maybe changing it
> > no-oneliner-ifs will make this a little clearer for you, but the return
> > statements really stand out when you scroll through the code - whether or
> > not they are wrapped in if blocks or individually.
> >> What's wrong about if clauses with proper indenting? These can even be
> >> collapsed with a sexy IDE.
> > Nothing wrong with them. It's just: Do you wrap the entire content of a
> > function in an if or do you make a negated if -> return statement? The
> > doesn't scale, the second makes things more readable - that was really
> all I
> > was trying to convey.
> For that specific "entire content of a function" case I mentioned the
> exceptions that allow returns at the beginning of a function that
> check preconditions.
> But I'm more referring to your initial refactoring in
> In such cases I think a sequence of if/else if/else blocks makes more
> clear for the reader that these are three distinct cases handled in
> the plugin init function.
> Roundcube Development discussion mailing list
> dev at lists.roundcube.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dev