Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106763 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 61535 invoked from network); 28 Aug 2019 21:10:09 -0000 Received: from unknown (HELO mail-vs1-f46.google.com) (209.85.217.46) by pb1.pair.com with SMTP; 28 Aug 2019 21:10:09 -0000 Received: by mail-vs1-f46.google.com with SMTP id j25so641282vsq.12 for ; Wed, 28 Aug 2019 11:42:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=N9Nlw+7jLHPdAp6nTiQEBb9grwLB2PWfegGQfYIwpAQ=; b=XbZqu4H7sMBnTAaw3hSiHdlqaYM26fzHgyigGFoN0TlUMZ6KXM+Pe3RtkI/UzmzOeE H0xVxVmfFMx6d/UNmx/Kq/dgVYmii2QBvSloXzaT1wogoQ7lQXyliGo6UaM6ekGrPmY9 /hxPYP0b7ScBUC+xneLYuV6loHAebr+5k2bwzxhKHYRqgpsI8qn4fUEzefp8V9Q+K2Yi UYAxIw08cO31GA66hfi7DxSV4QlAIDpaAIayvdwLwhFQnACiTyve+/7eFPDbt7E0gytV D8Gz6LkUXUuWYiYXJmBivOLWdfk8IfjieGbJCKSib2qYJsMKT96JXbOGAa4Ldvb4yNgp /7fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=N9Nlw+7jLHPdAp6nTiQEBb9grwLB2PWfegGQfYIwpAQ=; b=ZGn9W/lyJ3Of9xHTQdsvtqAn0yg8C8ggF48UzUizeE1OrvXDztRgT0PAvhdb0gsgMc GCMvQDaGTzrdP2Yv97vYHevgX+RG/TfbPwe244hSxsY0QwvmqXmwH6CdvgTQV9iESImi sx+PuFScchiunDsLVNY4NZ+OnkHalLIOxw2sqlLPhQXED0+UUoWudJwil9eZnrpvs9RH Ho7yIDHcenehstZkO64nXJ6KyWr0Gumc41UInlUtXz5pHa+Rae4Q1tBwbiIaAOhI/23g BiAxxs1w520aBcRpBSlaLVErHudxJHwwIsKjZhJNgc4ezf+XVSkoRlFA/MdH/ZT4wZ9F 4+OQ== X-Gm-Message-State: APjAAAUNBb5LZLuZYGUreM9u/YUpZPT1KGsSjWMihZqfH3aI/BZpsgQ3 OuxvV/z2QykqMwdSk17SN07DNffQjNzlnt36gD2Za/Ec X-Google-Smtp-Source: APXvYqyBpzBbQj4uSGZ2b8Lltr9wvTbISr9i9F+H6WrFZN6DJ+n2WZte9qx6Cy6YOkVdIO0ksgf/LI8qny53eO46lw4= X-Received: by 2002:a67:d69e:: with SMTP id o30mr3477452vsj.126.1567017741416; Wed, 28 Aug 2019 11:42:21 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 28 Aug 2019 14:42:09 -0400 Message-ID: To: Zeev Suraski Cc: Matthew Brown , PHP internals Content-Type: multipart/alternative; boundary="000000000000d58306059131bfeb" Subject: Re: [PHP-DEV] [RFC] Reclassifying engine warnings From: chasepeeler@gmail.com (Chase Peeler) --000000000000d58306059131bfeb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Aug 28, 2019 at 2:32 PM Zeev Suraski wrote: > On Wed, Aug 28, 2019 at 8:20 PM Matthew Brown > wrote: > > > We log 1 in every 1000 notices, and yes - being notice-free is a goal = =E2=80=93 > > though not one with any particular timeline at the moment, because we c= an > > just ignore the problem. I look forward to not being able to ignore the > > problem. > > > When was this goal set? Was there effort that went into it? > > My point is this: > > In a codebase where being notice-free isn't a goal - and/or where code > patterns that rely on the documented behavior of how PHP variables are > initialized as well as behave in read scenarios (with or without the > silence operator) - I think you're going to find a lot of such instances, > probably more so than in a company that made an informed decision to not > allow it and gradually work to remove existing code that uses it. For > many, this is not considered technical debt - but rather - using the > language *as intended*. Using the language in a way that is sanctioned a= nd > considered valid - alongside other ways which are also considered valid > (e.g. a notice-free codebase). > For the record, I don't view undeclared variable notices as technical debt either. I've engaged in that discussion at other points because I think this is a bad move even if it is considered technical debt. My personal opinion is that I like the flexibility of the language in this matter. I initialize my variables most of the time anyway, but, I don't think every other PHP developer should be forced to do that just because I like to do it. > > While I understand what you're saying when you say that you look forward = to > not being able to ignore the problem, it sounds like a fairly weak argume= nt > for forcing everyone else - many of whom don't consider this to be a > problem at all - to change their code. Instead, if this bothers you, mak= e > an informed decision to change - there's enough tooling to do that today > with reasonable effort. Or support the ability to flip a switch that wil= l > granularly force you to fix these particular issues. Forcing all users t= o > work in a certain way, because some of the users who want to work that wa= y > can't bring themselves to do it - doesn't sound very sensible IMHO. > > My feelings exactly. What benefits are we getting by FORCING everyone to follow this policy that individual users/companies/development teams can't already gain by just making it a policy and using 3rd party tools to enforce it? What HARM continues to exist in the language if undeclared variables only generate a notice - given the fact that how PHP handles undeclared variables is will documented and, in my opinion, actually a feature of the language? > I was hoping that the glaring obviousness of how other languages tackled > similar issues (Perl, JS) would go a longer way. It should. > > Zeev > --=20 Chase Peeler chasepeeler@gmail.com --000000000000d58306059131bfeb--