Re: About declare(strict_types = 1)

From: Date: Mon, 16 Mar 2015 12:19:54 +0000
Subject: Re: About declare(strict_types = 1)
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to internals+get-85040@lists.php.net to get a copy of this message
On Mon, Mar 16, 2015 at 12:49 PM, Pavel Kouřil <pajousek@gmail.com> wrote: > Hello, > > it's similiar to the safe_mode though. Sure, it's not as bad as INI > setting, but the "intent" is the same - a switch changing how code > behaves. > > When I talked about the Dual Mode with some friends who are userland > PHP devs (either current or former, because they switched to other > stuff), none of them called the Dual Mode a great idea. The responses > I got were mostly along the lines of "wow, this seems really weird" to > "WTF are those developers smoking". Everyone of them (sure, ~10 people > isn't really representative number) said that they think PHP needs > STH, but not this Dual Mode stuff. > > Seriously, think about it for a while - when some setting that changes > how code behaves was a good idea? > > (IMHO never.) > > Regards > Pavel Kouril > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > I was like that in the beginning when Andrea introduced the declare syntax. But this was because of a fundamental misunderstanding how declare actually works. Now I think it's a brilliant solution to introduce optional strict type hinting. It does not force a user who uses week type hinting to use, care or even know about strict type hinting.

« previous php.internals (#85040) next »