> So now to use such function you'd have to check your variables for
> typing - otherwise your application blows up. And the type-checking
> should be total - otherwise you miss some call to some function or some
> code path bringing wrong value and your application blows up at runtime
> - since static type checking is not available.
Unless you are aware of the type of your variables and the data they contain 
as you write your applications, you are only inviting trouble anyway. Yes, 
PHP handles type juggling on its own but it is not magic wand that makes 
caring for the data type of your variables meaningless.

> Meaning, unless all of 
> your code is type-enforced, you'd have to write a wrapper around each
> type-enforced function manually checking that wrong value didn't get in.
>   But you can do the same checks now, so what is the added value?
The one I mentioned not so long ago, or we you not paying attention? Having 
the type hinted on the function declaration saves me the time and energy of 
checking the type myself, which is something I have to do quite often. It, of 
course not, remove the need to validate your arguments completely. But it 
would be a big help.

Tomi Kaistila
PHP Developer

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to