[TYPO3-dev] RFC: CGL change regarding return statements

Andreas Wolf typo3ml at andreaswolf.info
Wed Mar 9 18:51:27 CET 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi Ernesto,

Am 09.03.2011 18:31, schrieb Ernesto Baschny [cron IT]:
> I see no conflict with your proposal and what we already say in the CGL.

I personally don't see that either, but as there have been complaints
about my RFC for refactoring t3lib_extFileFunc and also for the
mentioned review request, I wanted to put this on the agenda.


> There is no limitation of "only one return" in the validation part as we
> have it written down already: there can be several, which makes exactly
> what you are trying to do more readable.
> 
> What are the "parameters" to validate is of course depending on the on
> the method, I would say a parameter can be everything that might
> influence the outcome of the method. On a good designed system those
> would only be the input parameters, but I doubt it that it will be
> possible in our legacy code. ;)

If we can agree on an extended definition of "parameters", I would like
to have that inside the CGL; if not now, we should at least have it on
schedule for the next CGL review session and also try it out from now on.

I would also add a sentence about using exceptions instead of return
statements with arbitrary values. This should at least be done for all
new code...

Regards
Andreas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEAREIAAYFAk13vh8ACgkQHWtXp155bP9tgQCeKb3oQBVOHZiNTHD6+12v/677
yrIAnjl41xukaDmMCn7Ew/8uDeswPqto
=FCpC
-----END PGP SIGNATURE-----




More information about the TYPO3-dev mailing list