On Wed, Jul 1, 2009 at 8:04 PM, Stanislav Malyshev<s...@zend.com> wrote:
>> I agree. We won't be able to use an int type for something which
>> should take an int. That might not matter in user code, but if we
>> cannot actually type hint internals functions then its a problem.
>
> Internal functions have types, however parameters of different types are
> usually converted, not rejected.

Yes, rejection is bad. Coercion is good. (Silently accepting is bad).


>> My feeling is that scalars should be automatically coerced to the
>> correct type, if it makes sense to do so. (ie reject non-numeric
>
> That (coercion) is what internal functions do, but not what the proposed
> patch does (except for "numeric" hint).

Right. I think we're arguing on the same side. I'm just saying that if
the manual says 'int', we should be able to use int, and not be
required to use 'numeric'.


Thanks,
Paul




-- 
Paul Biggar
paul.big...@gmail.com

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

Reply via email to