[TYPO3-dev] Code humor
Martin Kutschker
martin.kutschker-n0spam at no5pam-blackbox.net
Tue Jan 27 09:00:16 CET 2009
Widmann, Manfred schrieb:
> Some kind of black humor, right? Wonder what happens, if someone decides to
> remove an if or add another one! :-o
>
> Error messages should be "thrown" immediatly together with an return, then
> this "funny" intendation isn't necessary ... this code maybe works fine but
> "stinks" - at least in my nose!
Many of the (older?) functions follow this pattern. Personally I don't
mind "early" returns, though there is now a preference for storing the
return value in a variable and use only a single return at the end of
the function.
Masi
More information about the TYPO3-dev
mailing list