On 14 Jul 2014, at 18:57, Andrea Faulds <a...@ajf.me> wrote: > On 14 Jul 2014, at 15:54, Derick Rethans <der...@php.net> wrote: > >> A compromise by adding more inconsistencies. >> >> I can buy the cast of scalars vs hint--of-complex types, but definitely >> not the introduction of a new group of casting rules. Keep it simple. > > It doesn’t change the casting rules; write an error handler that ignores > E_RECOVERABLE_ERROR and you get exactly the same result as a manual cast > inside the function. Rather, it simply adds validation. The casting works > like casting does everywhere else, but there’s strict lossless validation on > the type hint, similar to the non-scalar type hints except more lenient as it > allows equivalent values of other types.
ok, it might work for me if formulated like this. now, the question is, would it be possible to port these rules to zpp in PHP-Next? if the answer is “yes", then I’m all for it. otherwise, I’m a bit skeptical as inconsistency between extension-land and user-land code worries me -- Alexey Zakhlestin CTO at Grids.by/you https://github.com/indeyets PGP key: http://indeyets.ru/alexey.zakhlestin.pgp.asc
signature.asc
Description: Message signed with OpenPGP using GPGMail