Re: [RFC] Strict operators directive
| From: | Christian Schneider | Date: | Wed, 27 May 2020 09:59:27 +0000 |
| Subject: | Re: [RFC] Strict operators directive | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-110286@lists.php.net to get a copy of this message | ||
Am 16.05.2020 um 16:56 schrieb Max Semenik <maxsem.wiki@gmail.com>:
> On Sat, May 16, 2020 at 5:20 PM Mark Randall <marandall@php.net> wrote:
>
>> IMHO we need to know what is happening with editions, as I think this
>> would be an ideal candidate for that rather than another declare
>
>
> On the other hand, a declare would allow a gradual upgrade path where
> people can use strict mode for new code and convert file after file at
> their own pace, taking their time to fix all the problems - while already
> taking advantage of new features where possible.
The problem originally discussed (and among other things leading to the P++ proposal) remains:
We would have two semantically very different languages in one with just a little line at the top of
the file to distinguish between them.
I cannot look at code like
function same($a, $b)
{
return $a == $b;
}
and know how if it works with my usage of types.
In a way having this on a per-file-basis makes things even worse.
- Chris