RE: [PHP-DEV] Scalar Type Hints v0.4
| From: | François Laupretre | Date: | Wed, 18 Feb 2015 14:14:03 +0000 |
| Subject: | RE: [PHP-DEV] Scalar Type Hints v0.4 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-83068@lists.php.net to get a copy of this message | ||
Hi Nikita,
>
> I don't like the way this is heading with regards to internal functions.
> Apart from better inter-compatibility, the primary appeal of Andrea's
> proposal was that we have the option to make not only userland function
> calls strict, but internal ones as well. With these modifications this is
> lost for all practical purposes. (*)
Please refer to my other posts proposing single mode with the addition of four 'strict'
scalar types at ZPP level (would apply to internal *and*userland). These will be chosen by internal
function implementors when they decide it, not by the caller. I hope it can solve your question.
The idea is that internal function are treated as weak using the current ZPP types. Then, they can
be made strict, one by one, and argument by argument. No need to duplicate type hinting to arg_info
IMO.
Rasmus' (int -> float) coercion question does not exist if we find a single mode consensus.
And, I am decided to take the time it needs to find one, as I think it can lead to a much more
consistent design.
Can you just tell me if what I exposed above solves your concerns ? Thanks.
Regards
François