Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:106484 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 10355 invoked from network); 9 Aug 2019 14:56:23 -0000 Received: from unknown (HELO tbjjbihbhebb.turbo-smtp.net) (199.187.174.11) by pb1.pair.com with SMTP; 9 Aug 2019 14:56:23 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=php.net; s=turbo-smtp; x=1565958226; h=DomainKey-Signature:Received: Received:MIME-Version:References:In-Reply-To:From:Date: Message-ID:Subject:To:Cc:Content-Type; bh=aAnUX/XOMRKInKYROct9uZ yYs0UJCDGZXel6WVKuFcw=; b=nmN+sfytHtE58lNzbIDB4pPGa7DImyZbL7pgx0 gJrTlh39qb0T/16x+p3sNeU6cv8FHmCtVrBbZ7j2O0gjhrtpiKYNJdj4UnYcjSDq eO6z0QRbwZm3D7sA6SmKv77dLzchJxngQLQj3BCFVneIv+W4J2YepSU3kdQg2AsE +wYVc= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=turbo-smtp; d=php.net; h=Received:Received:X-TurboSMTP-Tracking:X-Gm-Message-State:X-Google-Smtp-Source:X-Received:MIME-Version:References:In-Reply-To:From:Date:X-Gmail-Original-Message-Id:Message-ID:Subject:To:Cc:Content-Type; b=Dj+WbtEKaSWx3D6lRxqDX4+TsSxoOALvoSoOvdHs8Z69Onw7OR1lVAk6aK2UEL /FKH6e6AZ1RJl8hsPtag3NM0QkKYhZavYABwg07iIZwn7Q6WrBLFNLvw7UAQUenA rJ8zKL6oDi0pl+NJ/5V9z1/uLrWaL1bZq7kzmrYzJOenk=; Received: (qmail 7795 invoked from network); 9 Aug 2019 12:23:46 -0000 Received: X-TurboSMTP-Tracking: 5213328848 X-Gm-Message-State: APjAAAW5/hHv9pK8MFlGFhbLsMSW7VBEo+xqKJedTEXafsG0YsYGAf3X A6wOfBxnjb0gWmHnrW2K7FI+3oa4kz8zO/qZrkM= X-Google-Smtp-Source: APXvYqzrMBebGc1Yk6cHHpAttDXpb7v1JOhQs6KNXETH9kdqyX2SdmELRq2M+SGjHBx4P3uIAO+ZcgsyH7GHxUxg8e8= X-Received: by 2002:a0c:e78f:: with SMTP id x15mr17935469qvn.0.1565353425630; Fri, 09 Aug 2019 05:23:45 -0700 (PDT) MIME-Version: 1.0 References: <8a95f23e-4145-46ee-ba49-6c24c32c8243@Spark> In-Reply-To: Date: Fri, 9 Aug 2019 15:23:34 +0300 X-Gmail-Original-Message-Id: Message-ID: To: =?UTF-8?Q?Micha=C5=82_Brzuchalski?= Cc: Sergey Panteleev , Nikita Popov , Kris Craig , Internals Content-Type: multipart/alternative; boundary="000000000000e1fd2d058fae3eee" Subject: Re: [PHP-DEV] Bringing Peace to the Galaxy From: zeev@php.net (Zeev Suraski) --000000000000e1fd2d058fae3eee Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Aug 9, 2019 at 11:15 AM Micha=C5=82 Brzuchalski < michal.brzuchalski@gmail.com> wrote: > Hi Sergey, > > pt., 9 sie 2019, 09:40 u=C5=BCytkownik Sergey Panteleev > napisa=C5=82: > > > As I understand, in P++ it was planned to drop the legacy code, add new > > functionality and painlessly implement BC. > > > > Who wants =E2=80=93 migrates the PHP project in P++, who doesn't =E2=80= =93 continues to > > use PHP. > > > > New projects, for example, will use P++ already. > > > > Well, how is this different from the new version of PHP (e.g. PHP 9)? > > > > Who wants =E2=80=93 adapts his code for PHP 8/9 with all its BCs, who d= oesn't =E2=80=93 > > continued to use PHP 7/8. > > > > As I understand editions concept it would be far more easy to interoperat= e > with old edition written library than in separate languages like PHP and > P++. If new edition introduce syntax breaking change it would be still > possible to to interoperate with old code in old edition and work on a > project based on new edition. > If we intend to break syntax frequently, then yes. But this is poor language design. If we take a couple of years to focus on the fundamentals of what folks find objectionable about PHP today, and introduce P++ with solutions to these issues - there's no reason that every new version continues to break compatibility - certainly not in a substantial manner. We need to focus on the painful changes at the first stage, when P++ is introduced - while keeping other elements - ones which are incremental but do not introduce compatibility breaks - to a later time (if we don't have the developer-power to deliver them). If we let ourselves off the hook, and do these breakages in stages - editions are basically a workaround. Yes, editions would allow you to work around the fact that your code breaks every time you upgrade - but at a fundamental level, people are still wasting their time writing and rewriting and then rewriting once more the same code. Not to mention that unless I'm missing something, maintaining the implementation for all different editions would be more complicated than having just two dialects. Now, it doesn't come to say that P++ will never be able to break compatibility. We also break compatibility in PHP, in major versions. But it does mean that something along the lines of moving from dynamic to static, can't happen further down the line. Changing operator or type-conversion behavior - has to happen now and not further down the line. Features such as union types and others - can happen at a later stage. I don't think there's a need for editions for that purpose, the versions we have are sufficiently granular. Even more so since this will likely effect P++ more frequently than PHP - a crowd which appears to have a much stronger bias for features than for downwards compatibility. That way you can end up on for eg PHP8 supporting edition=3D2020 with new > features which break compatibility but still working with PHP7.4 treated > perhaps by default as edition=3D2019 in future versions. > I could be wrong, but I don't think that even Nikita thinks we'd have a new edition every year. Zeev --000000000000e1fd2d058fae3eee--