[TYPO3-dev] [TYPO3-core] RFC: #13697: Add possibility to retrieve extension version

Francois Suter fsu-lists at cobweb.ch
Wed Mar 10 13:06:11 CET 2010


Hi,

> An API that doesn't have clean types (for parameters and return values)
> makes working with it harder: If this function e.g. can return both a
> string or a boolean, the caller needs to make sure that it is a string
> before e.g. applying string functions on the return value (like doing a
> split for the version parts). It's easy to forget this check, and this
> will result in all types of hard-to-track bugs (especially if all the
> developer remembers is "this function usually returns a string").
>
> Working with a variable if its type is known is easier and less error-prone.

I fully agree with that. We should drop the old, bad habits of not 
caring about typing, in particular returning variable types from 
function calls.

Cheers

-- 

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch




More information about the TYPO3-dev mailing list