[TYPO3-dev] Extensions need update for 4.3!

Ingo Renner ingo at typo3.org
Mon Oct 13 17:14:03 CEST 2008


Ernesto Baschny [cron IT] wrote:
> Dmitry Dulepov wrote: on 09.10.2008 23:04:
> 
>> Ernesto Baschny [cron IT] wrote:
>>> Well, NULL wasn't wrong until probably 4.3, those extensions were not
>>> "broken" before, which is why I don't think they should "brake" after
>>> the 4.3 upgrade.
>> I think it depends on the view. Does saying "array" mean that null is
>> right? To me it looks wrong.
> 
> Yes, good notice. It looks wrong to you, but nobody ever stated it was
> wrong. We could change it now so it is wrong, but I see no apparent
> reason to do so.

I say it was never right, why should we declare it as right now?!

> Even java, which is known for its strong enforcement of types works like
> that:
> 
> class HintApp {
>     public static void main(String[] args) {
>       HintApp.test1(null);
>       HintApp.test2(null);
>     }
>     public static void test1(String[] args) {
>       System.out.println("Hello 1");
>     }
>     public static void test2(HintApp test) {
>       System.out.println("Hello 2");
>     }
> }

but this is something really different: it's function/method 
overloading... nothing to do with this issue here (type hinting).

> Works like a charm. I passed "null" to a method expecting an array of
> string and to another method expecting a class.

no, you past null to a different function, with the same name.


Ingo

-- 
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2




More information about the TYPO3-dev mailing list