Re: Coercive Scalar Type Hints RFC

From: Date: Sat, 21 Feb 2015 21:38:33 +0000
Subject: Re: Coercive Scalar Type Hints RFC
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-83434@lists.php.net to get a copy of this message
Hi Zeev, On Sat, Feb 21, 2015 at 6:22 PM, Zeev Suraski <zeev@zend.com> wrote: > All, > > > > I’ve been working with François and several other people from internals@ > and the PHP community to create a single-mode Scalar Type Hints proposal. > > > > I think it’s the RFC is a bit premature and could benefit from a bit more > time, but given the time pressure, as well as the fact that a not fully > compatible subset of that RFC was published and has people already > discussing it, it made the most sense to publish it sooner rather than > later. > > > > The RFC is available here: > > > > wiki.php.net/rfc/coercive_sth > > > > Comments welcome! > I was really looking forward to the RFC. However the dependence on an INI setting and the question of massive internal BC break are a bit too much I think. They are necessary as you explain to allow internal functions/ZPP to have the same conversion rules as userland functions. This INI setting is quite similar to introducing two modes as well, but on the server configuration level instead in a much more fine granular way in scalar type hints v0.5. I see much more compatibility problems for third party libraries here. Now if I had to decide between having two modes on a granular file level or an INI setting (option 2/3) or massive BC breaks (option 1) to get scalar type hints in PHP, then two modes with declare() doens't look, because I can pick the mode I want, and no-one can force it on me. > > Zeev >

« previous php.internals (#83434) next »