> -----Original Message----- > From: Rowan Collins [mailto:rowan.coll...@gmail.com] > Sent: Wednesday, July 16, 2014 1:25 PM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] [RFC] Scalar Type Hinting With Casts (re-opening) > > Zeev Suraski wrote (on 16/07/2014): > > For me the introduction of a new set of rules is a deal breaker. > > I'm -1 on the RFC the way it is, and +1 if we implement these 'hints' > > as implicit casts, plus change implicit casts to emit E_CAST in case > > of loss of data or 'bogus' conversions. > > Just to be clear, implementing E_CAST would require introducing a set of > rules > for when to throw it. By a strict reading of your message, that's a deal > breaker.
Well, not really. First, like all strict notices, they'd be off by default, so standard behavior won't change at all from now, and 'type hints' behavior will be identical to that, so again, nothing new to learn other than the new syntax. Secondly, if you do enable E_CAST - you may have to slightly *modify* your understanding of implicit casts, but you won't have to learn two different sets of rules. New users will see just one consistent set. Zeev -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php