On Tue, Feb 3, 2015 at 7:14 PM, Andrea Faulds <a...@ajf.me> wrote: > Hi Dmitry, > > > On 3 Feb 2015, at 04:07, Dmitry Stogov <dmi...@zend.com> wrote: > > > > I have similar opinion. Strict typing looks foreign for PHP. > > It is in a way, yes. PHP has traditionally been “weakly-typed” everywhere. > > That being said, we’re not always weakly-typed (there are strict type > checks in some places), and userland code has sometimes done strict type > checks anyway. > > > I see, strict type hints may be useful. > > Aspecially for testing and error detection, but anyaway, I'm not sure if > and how it should be enabled. Declare() is a working solution, but it's not > excelent. > > It’s not a perfect solution, but I haven’t seen anything that seems to be > much better. The best bit about declare() is that it would make strict > types completely optional, so people who don’t like them wouldn’t have to > use them, even if they call code which does. >
I agree. It's probably the best solution that we saw. But it's still not good enough, It would be great to make the obvious part of the proposal accepted first. I would suggest to make two separate voting questions. 1) Enable scalar type hinting with standard rules. 2) In addition enable strict type hinting triggered by declare(). Thanks. Dmitry. > > -- > Andrea Faulds > http://ajf.me/ > > > > >