Marc Mutz
> The three clauses should stay three clauses if the action (their
> then-block) is independent. If the then-block, as you seem to suggest,
> is idenitical in tokens and semantics, then you *will* find a name to
> describe it that doesn't just transliterate the original C++ code into
> English: shouldDeleteThing, thingIsExpired, isNoLongerNeeded(thing),
> ...

Just to be clear, my example code's delete thing was just using that as
"there's some random tidy-up we need to do before any early return"; so
the three conditions are all "we need to return early from this method"
and the need to delete thing (which was nowhere referenced in any of the
conditionals) is incidental to the test.  In such a case I very much
doubt there's a nice name for the method.

        Eddy.
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to