Re: weak and strict type checking RFC
| From: | Pierre Joye | Date: | Sat, 04 Jul 2009 18:25:55 +0000 |
| Subject: | Re: weak and strict type checking RFC | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-44704@lists.php.net to get a copy of this message | ||
hi.
On Sat, Jul 4, 2009 at 8:12 PM, Lukas Kahwe Smith<mls@pooteeweet.org> wrote:
> Well to me it Sounded like you wanted to Rely on Standard Type juggling and
> what i am proposing is more strict than that. More over i am Not convinced
> that strict should Be the Default.
The default is what we have now (implicit mixed). The (type) syntax is
known already, it would be rather confusing to use yet another syntax
in this case.
I like the current proposal with "int foo" for strict and "(int) foo"
for an automatic cast. As Gwynne suggested on IRC, I would also like
to have "mixed", for completeness. It brings nothing but it makes the
code clearer. Another useful type would be "callback".
Cheers,
--
Pierre
http://blog.thepimp.net | http://www.libgd.org