Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106953 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 14917 invoked from network); 12 Sep 2019 16:35:32 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 12 Sep 2019 16:35:32 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id 6776A2D1FD2 for ; Thu, 12 Sep 2019 07:11:25 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00,BODY_8BITS, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,FREEMAIL_REPLY, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Virus: No Received: from mail-vs1-xe30.google.com (mail-vs1-xe30.google.com [IPv6:2607:f8b0:4864:20::e30]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Thu, 12 Sep 2019 07:11:24 -0700 (PDT) Received: by mail-vs1-xe30.google.com with SMTP id s18so16315306vsa.0 for ; Thu, 12 Sep 2019 07:11:24 -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=//DIurzEFwlxE8Le+w3rnCIQHbz7A5EKErBMv/cnZyw=; b=cIUsOAdz+qLeYpR2GO6j3zTGDfJtgmm+2xzpzZBuNhCpzfYbRFwkVc65XAhfGAx0qk 4u+gr3SCja8NveG23z1CJlW/uRr2QrL1hK697RNudxndbL6F9NOD8qMdyIf8jhTN0JVs PD4+2GXs4j8ZAIH0GWx8LqSfaSgwxSKWHL6md+/TK6W3XDNAmh847mF9GdZ05pbsMyM3 /n09Al+8diQBPbBzF8VoBcL14H8RqXGMaS5v/yLuuc4T5yybmwacgkFk9OiXUX+C8JF+ aLEWvxnMXK7fPEzdQVIQlisSATSAd54LRUvWyZyKTNrniiEaEc/lnBO3dwbS3QOsHV7d iMAQ== 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=//DIurzEFwlxE8Le+w3rnCIQHbz7A5EKErBMv/cnZyw=; b=ibBSsMib59+Yu8koQlm8fby4BLTMZ0CzE0K/hd72XAKeCblvn8uYHbinIzad/tRmYL DIAM1NHJeSzD8NoNYQzF3TE/sH7a5ouxX+itU03EXoqHfKmteFNcnvsRWK9jnwVKu9Gx eepn/YOW9r2VJKoaOoWrZES0A9t0f1VadApqP391wpl2yRqscR56wa7HXlDvKsjrvFgA VKH5aTUCmr4xN7keVPGzO40mG/r/YGEXIKwoCKBh1IV2jVRongCpIktJlFxr70eIuMe1 wGo0sPYM6mgO/v9C1VpxlnKhlS8DcDgBxUfQ08tDlMtqyGIBkvtCjJ+MIYaNzJFt9nKl E4dw== X-Gm-Message-State: APjAAAUJ9RfhYo2njL2xfwFYlRBmolrpttzLWgm8z4jTdNwSgPzrpHTd qxUDAGC7M8qCNVJCYfFow5SepCWwgIJVEvG1wsc= X-Google-Smtp-Source: APXvYqyTWLRAGIq+ZkBOAW0CE1l8fnQLpreo/HzJr1GY9hmTXb1ILMN1yxQ2HK9MOfGTSBuvkKp+bz3C7CuuMCMH7iM= X-Received: by 2002:a05:6102:3031:: with SMTP id v17mr16666905vsa.217.1568297484453; Thu, 12 Sep 2019 07:11:24 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 12 Sep 2019 10:11:13 -0400 Message-ID: To: Arvids Godjuks Cc: Claude Pache , Marco Pivetta , Rowan Tommins , PHP internals Content-Type: multipart/alternative; boundary="00000000000076956605925bb6d7" X-Envelope-From: Subject: Re: [PHP-DEV] [RFC] Reclassifying engine warnings From: chasepeeler@gmail.com (Chase Peeler) --00000000000076956605925bb6d7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Sep 12, 2019 at 10:06 AM Arvids Godjuks wrote: > > > =D1=87=D1=82, 12 =D1=81=D0=B5=D0=BD=D1=82. 2019 =D0=B3. =D0=B2 16:02, Cha= se Peeler : > >> On Thu, Sep 12, 2019 at 9:55 AM Claude Pache >> wrote: >> >> > >> > >> > > Le 12 sept. 2019 =C3=A0 15:33, Marco Pivetta a = =C3=A9crit >> : >> > > >> > > $foo[$key1][$key2] =3D ($foo[$key1][$key2] ?? 0) + 1; >> > > >> > > Marco Pivetta >> > >> > That violates blatantly DRY (twice the exact same lengthy expression >> > `$foo[$key1][$key2]`), so it is not a satisfactory solution. >> > >> > And that's why PHP is so awesome. You don't have to do all these stupi= d >> tricks just to do something simple like increment a counter. But, it loo= ks >> like we're going to throw that out of the window because some people thi= nk >> that since they like doing it like the way above, everyone should have t= o. >> >> > =E2=80=94Claude >> > >> > >> >> -- >> Chase Peeler >> chasepeeler@gmail.com >> > > Easy, because experience shows that leads to bugs and lots of them. > Security issues even. > If you want to write predictable code - you have to init your > variables/arrays. And check for existence/null. If fixed at least a few > dozen bugs in my system I took over in the last few months specifically > because of undefined variables or indexes. > > Never once have I advocated not initializing variables or arrays. I'm jus= t saying that we shouldn't force such behavior. Many of us can figure out when we need the extra boilerplate and when we don't. Don't force us to have to deal with the additional burden in every single case because someone else can't. > It works for small stuff, but when you have a codebase with 100+k LOC and > more, you have to go strict or it starts to cost a lot of money and > personnel to keep things running along. > > -- > Arv=C4=ABds Godjuks > > +371 26 851 664 > arvids.godjuks@gmail.com > Skype: psihius > Telegram: @psihius https://t.me/psihius > --=20 Chase Peeler chasepeeler@gmail.com --00000000000076956605925bb6d7--