On 19/11/2014 21:39, Andrea Faulds wrote:
I am putting the Safe Casting Functions RFC to a vote.
https://wiki.php.net/rfc/safe_cast#vote
Voting starts today (2014-11-19) and ends in 10 days’ time (2014-11-29).
Hi,
Judging from the discussions we've had with other members of AFUP, I'm
guessing we'd kind of be +0.5 to this.
Having a proper definition of what is a valid int/float/string could
prove useful, especially in a context of stronger typing (like scalar
type-hints, which is one case this definition would be the most helpful).
This definition would have to be considered as some kind of an
*official* one, though -- and not just be used for a few functions.
Staying within the context of this RFC, we'd probably prefer the try_*()
version of those functions, which would be useful for validations --
even if throwing exceptions from regular non-OO functions is not quite
(for now?) the PHP way.
Not a full +1 though, mainly because these functions only feel like
half-a-step towards stronger typing.
--
Pascal MARTIN, AFUP - French UG
http://php-internals.afup.org/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php