Re: A plea for unity on scalar types

From: Date: Fri, 13 Mar 2015 19:51:30 +0000
Subject: Re: A plea for unity on scalar types
Groups: php.internals 
Request: Send a blank email to internals+get-84714@lists.php.net to get a copy of this message
Pavel_Kouřil wrote: > - It is a "setting" that changes the language's behavior; I don't > think that it matters whether or not it would be an INI setting or the > declare() one, because both of them are bad. > > It allows people who want strict typing to declare it on a per-PHP-file basis. An INI setting cannot offer this guarantee. This is required if weak and strict are to be both supported. > - It does not "unite different usages of PHP into a single group"; it > does exactly the opposite, splitting PHP usage into TWO groups. > > It also allows the two groups to work together rather than forking PHP into separate languages: PHPstrict and PHPweak. > - Once this dual mode would be introduced to PHP, there would probably > be no way of removing it later without massive BC break, once most > people would realize that it is really awful to have it in the > language. > > What is "really awful" about this? Moving forward, everything could move towards strict typing. I could see PHP 8 or 9 having strict be the default, if everyone wanted that. And then the declare() being deprecated and removed as major versions increase. Scott

« previous php.internals (#84714) next »