Re: [PHP-DEV] [RFC] Strict operators directive

This is only part of a thread. view whole thread
  110286
May 27, 2020 09:59 cschneid@cschneid.com (Christian Schneider)
Am 16.05.2020 um 16:56 schrieb Max Semenik 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