On Jan 4, 2008 12:23 AM, Stanislav Malyshev <[EMAIL PROTECTED]> wrote:
> > This code is just a good argument *FOR* type hints. When foo is:
> > function foo(int $bar) {...}
> > and you want the code to die if $bar is not integer, then foo($bar) would be
>
> Why would you want it? I wouldn't want my code to die, I would want it
> to work.
>
> > you have either an int or string representing an integer in $bar, then
> > foo((integer)$bar) would work just well.
>
> And then how exactly strict typing helps you? You can not control at
> development time if everybody uses (integer) or not, since being
> interpreted PHP has no static type checking. So only option to find it
> out is to leave a minefield behind hoping that testers and not actual
> users would be ones who make it blow up. What if testers fail to find it?Check google for all fatal errors we introduced about OO strictness (or getter/setter) and you will see what does that mean to be unclear about how strict one should be. I'm not arguing to force strictness but I would love to have it, on a per class basis for example (</dream>). -- Pierre http://blog.thepimp.net | http://www.libgd.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
