[TYPO3-dev] Code humor

Oliver Klee typo3-german-02 at oliverklee.de
Wed Jan 28 13:54:57 CET 2009


Hi,

Bernhard Kraft schrieb:
> I also follow Martins preference: Early returns are ok ... at least if they
> make sense like in above situation.
> 
> It would probably even make sense in above situation to collect multiple
> error
> messages if more of them apply at the same time ...

In my projects, we use this strategy:

  Use early returns *only* for guard clauses (for errors an trivial
"empty" cases) at the very beginning of the function *and* if they
improve readability.


It might be that we also talked about this in the CGL session at the
T3DD08, but I'm not really sure about that.


Oliver




More information about the TYPO3-dev mailing list