Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106199 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 72142 invoked from network); 9 Jul 2019 14:10:34 -0000 Received: from unknown (HELO mail-ot1-f49.google.com) (209.85.210.49) by pb1.pair.com with SMTP; 9 Jul 2019 14:10:34 -0000 Received: by mail-ot1-f49.google.com with SMTP id z23so19527595ote.13 for ; Tue, 09 Jul 2019 04:30:12 -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; bh=0NO0dkDZW2e99vafK1DtI9i15K9Tp64Kq16fC6j61nA=; b=NZ4VwOzz/q+18YHvzxTcTmT9mp9N7czbhz2Ohbovxj92uf8FUdk2uk4Bf0u705jhcB LHsTpCjLUEbctOVvyTzez9bKwpa1dsyd4eC+ibZf8nROiDEzdkECjpfwqnaCX1BiQOZ/ 7b/Rz9OWZAtERont32DoxfGoeZfZMSSW4xSdix7hzNmPvRQR8jTdOk9QbvLKSxCHCvHd iHe3Ii4pSrTRstNgDIC/HUo+ta4hvXz4EFWcN89v15748ltGq6In8vYWOQB4xdiQzadW W7FkEPaoi1ajgCDGerBtkakON9xUFz2OsIxiKp0FqIyh8asIx/w6GX6Xau650h/NsaQg r4WA== 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; bh=0NO0dkDZW2e99vafK1DtI9i15K9Tp64Kq16fC6j61nA=; b=mO1yX9l8GO+iIWxyGfWKRnDB6JdVEOB//yJbs+xfJYfeB7KtJbGrijIZ/lU5Dns00G vktaMpz2NP3E8JGtrviwcVxLNw8L95s4X/830XUJM8+nBrmtMnQxvfhDE0Q8Kqv1rvnf mCf24qDAdansshmleVr7FNyDFxixBsyGa8iQUmm7MC6vZYHD9sBhWFZKkaKUNkyeG8Zw FljU3dWfWDn0sPJoa6Yfkh2W3SRv7zpvaDX3i1wTnHiRb/TODaAWH9cyMxxyhCD1hGXj 8zoOYPIUtj4bm3GnhAJMV3tJwMrjkTF+8qQYFAyoV+NoP6n+hdvEHRpJtIDQSGDDYjkf 0CNg== X-Gm-Message-State: APjAAAVpSanBy/+V3iDfxdNIKRBJmSB1snexC656jJapkH6zlQEaiJfv ynjWE2eSRR+BE29DAMYVUIVys8dqTHAPTZZMG1xTTUIFatM= X-Google-Smtp-Source: APXvYqzTvxRGjWs22W3WBYBeyZ+1tYTXeWXJJQseTrhT5m2hide6mY3XseXPHyIwAytiGVAdeVdzyddpmYOzuxveBuc= X-Received: by 2002:a9d:6042:: with SMTP id v2mr17248459otj.73.1562671811532; Tue, 09 Jul 2019 04:30:11 -0700 (PDT) MIME-Version: 1.0 References: <88b65a46-f080-ae08-d89e-ee6c4299a19c@heigl.org> <6BE96F43-19D5-465E-B93F-0B3CC2E11F25@gmail.com> In-Reply-To: <6BE96F43-19D5-465E-B93F-0B3CC2E11F25@gmail.com> Date: Tue, 9 Jul 2019 13:30:00 +0200 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary="0000000000003a1b73058d3de235" Subject: Re: [PHP-DEV] [VOTE] Strict operators directive From: arnold.adaniels.nl@gmail.com (Arnold Daniels) --0000000000003a1b73058d3de235 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jul 9, 2019 at 12:22 PM Claude Pache wrote= : > > > > Le 9 juil. 2019 =C3=A0 12:09, Andreas Heigl a =C3= =A9crit : > > > > > > > > Am 09.07.19 um 12:06 schrieb Christian Schneider: > >> Am 09.07.2019 um 11:30 schrieb Marco Pivetta : > >>> I wasn't sure about the full implications of this, but after some > thought, > >>> the worst that can happen is excessive strictness, requiring to drop = a > >>> single declaration on top of a file =F0=9F=91=8D > >> > >> When you drop the declaration on top of the file the semantics of your > operators suddenly change, e.g. > >> "42" < "7" > >> changes from true to false and you get subtle bugs. > >> > >> And if you try to read other people's code (or even try to copy/paste > it) then make sure you keep in mind which mode they are programming in. > > > > But that's the same for `declare(strict_types=3D1);` > > > > Cheers > > > > Andreas > > No, it=E2=80=99s not the same thing as declare(strict_types=3D1). > > With declare(strict_types=3D1), you just get additional TypeErrors. It wi= ll > not actually change the semantics of code that works in both > non-strict-types mode and strict-types mode. This is a useful feature whe= n > refactoring legacy code. > > The worst thing that can happen with declare(strict_types=3D1), is that c= ode > won=E2=80=99t work any more. > > The worst thing that can happen with declare(strict_operators=3D1), is th= at > code will change semantics. > > =E2=80=94Claude > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > After discussing it with Nikita and Derick, I've decided to close the voting for this RFC for now. The change is too large to merge it this choose to a feature freeze. Additionally, it seems that more discussion is required. I will reopen the RFC at a later moment, targetting it at PHP 8. Regards, Arnold --0000000000003a1b73058d3de235--