Re: Strict typing

From: Date: Wed, 11 Aug 2010 20:59:12 +0000
Subject: Re: Strict typing
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  Groups: php.internals 
Request: Send a blank email to internals+get-49383@lists.php.net to get a copy of this message
On 11 August 2010 21:59, Zeev Suraski <zeev@zend.com> wrote: > Consensus about what?  About two similar features with slightly different > syntax being a bad thing?  I don't think we need consensus for that.  That's > not up for discussion.  It's an axiom for PHP. Of course it depends on your definition of "similar features." One feature checks the type of an argument, the other checks the value of an argument and casts it to another type if necessary. I see it as serving two different applications, just like == and === are meant for different things despite being two similar operators. > See above.  It would do everyone good if they don't just think about > themselves and whether they're fine or not with a given feature, but about > the impact it would have on the userbase at large. Not sure what kind of impact we're talking about here. Currently, there's no scalar type hinting and there will never be a consensus around strict XOR weak. Having an implementation that allows both while reusing a familiar syntax (parentheses as a way typecast) looks like the best (and perhaps only) way to move on.

« previous php.internals (#49383) next »