> - I'd like to have E_CAST on all castings/type jugglings even if we do 
> not get scalar type hinting.

$var = 6.3;
$a = (int) $var;

Or $b = (bool) "1";

This is usual code and it could be wanted to losse information on casting. 
Triggering errors for that would be extremely annoying.


> - I propose to say/implement "scalar parameter casting" instead of 
> "scalar type hinting" with a casting syntax:
> 
>      function foo( (int) $i, ...)

That's bad to read, destroys the possibility to integrate method overloading 
one day in the future, and it is telling the wrong story.

If I have "function moo(int $var)" it shows that the method expects an integer.
If I have "function moo((int) $var)" it looks like: Give me whatever you want 
and I cast it into an integer.

Christian

Reply via email to