Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114924 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 36539 invoked from network); 17 Jun 2021 09:46:40 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Jun 2021 09:46:40 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 139091804D1 for ; Thu, 17 Jun 2021 03:03:39 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 17 Jun 2021 03:03:38 -0700 (PDT) Received: by mail-ed1-f43.google.com with SMTP id n20so3170569edv.8 for ; Thu, 17 Jun 2021 03:03:38 -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=Jf+9hOctC2IekIet5PerqXksVnt4yTa9R6v1FQT6frE=; b=U/3tj1G51w+xAQiFZopgkdB1RTXeNoAJvj4urR+SfDcOj/qutruhzt9XFP9G/nQeox LzSLEFwEtf1UvmM7qx6nAnoE08qnk//gLR9D8MJgg3vjGoxSpFWykkC/VDPdvqyu2E/w pNpF9PIi0U5xznzOPF0Ve11v3+ozz09/XZco4R8Mq2gFk+yioWJmSVtxmSlJYY4Xy2V8 ODt+U6K9aXduNVOmxFrsRCpzzgC5KLkv5M6uGMxZ6nwxRWMAs7ZhxcFcfbiwp2yl2DE2 jndZhUd5zQEJ6Vat2bhrQgRugRqIWYaChM8TfLO3bofHRRG2fKxBmdkLTQXccUU7eSaR rEKw== 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=Jf+9hOctC2IekIet5PerqXksVnt4yTa9R6v1FQT6frE=; b=o28DUnHf4TGIKZf2+4P6+7EggBLq38IzKTLp29cYl8C1aSN+bdU7PL1b7a22Ka9NLy Y+c8CbROW7Ww4tfSbuNyPOvMa0s8gmctdO0K5SlIk2GuzHub5cIELoxClW6d+noifKTx qnJSmzNz8HVBWVNCoiK2Wu4G4KFqdYCcViIK4vu5UQ9jGNP0n/sqjxD+Xe7sF0P1YWlR tLB69QqmXl2QMN5V93y59ayxRgfsaoY8ftDRrVoTkv0r0jrbqNiqpq0kJJdz6cabxNU6 v9yV7fOhgnGe4tE4rKDP3Knjt6nYPu4wwrsYr3ett/qHJ89tolaW2iZ2i/J9AJ9yGVLM orrw== X-Gm-Message-State: AOAM531JJFLbeCZuuuyElpDq+xTqLghqRnzPTkrc2Vh5EiXBj1DJxejp zSeBT9lkmreImNSIsXTdUlhkTUHwwrtdbo2WAdo= X-Google-Smtp-Source: ABdhPJxzPDgItqPyrl5K6hDEBVmfdHq+NHlecxZXZHYGz0jZdPTQOfslD9qHmX7fhjHGOjBmoADnppUJ/zGfiHMAMLw= X-Received: by 2002:a05:6402:b75:: with SMTP id cb21mr5344486edb.255.1623924217188; Thu, 17 Jun 2021 03:03:37 -0700 (PDT) MIME-Version: 1.0 References: <88588b8f-5729-4458-90b1-c602f751e128@www.fastmail.com> <33fd3541-8518-4f98-a258-705f85180ed1@www.fastmail.com> <20210617115323.1a6c26d7@mcmic-probook.opensides.be> In-Reply-To: <20210617115323.1a6c26d7@mcmic-probook.opensides.be> Date: Thu, 17 Jun 2021 13:03:20 +0300 Message-ID: To: =?UTF-8?Q?C=C3=B4me_Chilliet?= Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000001b932c05c4f35284" Subject: Re: [PHP-DEV] [RFC] New in initializers From: drealecs@gmail.com (=?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?=) --0000000000001b932c05c4f35284 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jun 17, 2021 at 12:53 PM C=C3=B4me Chilliet < come.chilliet@fusiondirectory.org> wrote: > Le Wed, 16 Jun 2021 10:16:37 +0200, > Nikita Popov a =C3=A9crit : > > > 1. Eagerly evaluate initializers on declaration. This is what I tried i= n > an > > earlier revision of the RFC, and I don't think that approach works. It > > breaks existing code and has various other unpleasant complications. > > 2. Precisely specify the current behavior. I don't want to do this > either, > > because the exact places where evaluation happens are something of an > > implementation detail. If in the future we find it convenient to separa= te > > evaluation of non-static properties on object instantiation from > evaluation > > of static properties and class constants (which are not strictly needed > at > > that point), I'd like to retain the liberty to make such a change. > > 3. Do not specify an evaluation order, beyond that evaluation happens a= t > > certain uses of the class. Evaluation order may change across PHP > versions. > > If your code relies on any particular order, your code is broken. > > If option 3 is considered, it means the evaluation order may change, if w= e > can > change the evaluation order, why not go for option 1? I do not understand > which > existing code can break with option 1 and be fine with option 3, it means > this > code relies on undefined behaviors, no? > > C=C3=B4me > > I think this message might have more details for why option 1 is not simple to solve: https://externals.io/message/113347#113607 --0000000000001b932c05c4f35284--