RE: [PHP-DEV] Scalar type hinting

From: Date: Thu, 01 Mar 2012 01:16:44 +0000
Subject: RE: [PHP-DEV] Scalar type hinting
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  Groups: php.internals 
Request: Send a blank email to internals+get-58378@lists.php.net to get a copy of this message
> -----Original Message----- > From: Kris Craig [mailto:kris.craig@gmail.com] > > @Richard I think you made a very good point. Should we treat a float => int mismatch the > same as we would a string => int mismatch, or should the former fail more gracefully? I can see > good arguments for both. > > --Kris I'm beginning to think that the type hinting question is too closely related to the dirty secrets of type juggling to resolve them separately. You may have to either discard consistency, or else fix the problem of silent bizarre conversions at the same time ('foo'==0, '123abc'=123). Fixing the conversions is a BC break though. John Crenshaw Priacta, Inc.

« previous php.internals (#58378) next »