Re: Re: Flexible type hinting

From: Date: Fri, 03 Jul 2009 13:35:20 +0000
Subject: Re: Re: Flexible type hinting
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-44682@lists.php.net to get a copy of this message
On 03.07.2009, at 15:04, Paul Biggar wrote:
Hi Ilia, On Thu, Jul 2, 2009 at 3:35 AM, Paul Biggar<paul.biggar@gmail.com> wrote:
Thanks to Ilia for getting to ball rolling on scalar type hinting. I believe I have a solution that caters to each crowd, without being too complicated.
My impression is that there only minor support for the "flexible" approach, and that even then, everyone prefers strict checking by default. So the ideal seems to be your patch, with the addition of function x ((int) $casted_parameter) { ... }
hmm not sure that the consensus of a "weak" check would be an automatic cast. Actually that wouldnt be much of a check in that case. I think the other side is more asking for what Ilia already begun with "numeric" in the sense of a weak checker. After the check it could go ahead and cast too for all I care, but it shouldnt be the equivalent of a cast. But maybe you are not implying that and I am just getting confused by the syntax. regards, Lukas Kahwe Smith mls@pooteeweet.org

« previous php.internals (#44682) next »