Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119459 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 31870 invoked from network); 3 Feb 2023 16:37:03 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Feb 2023 16:37:03 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D2F0C18037E for ; Fri, 3 Feb 2023 08:37:00 -0800 (PST) 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_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 3 Feb 2023 08:37:00 -0800 (PST) Received: by mail-ot1-f50.google.com with SMTP id n25-20020a9d7119000000b0068bd8c1e836so1512258otj.3 for ; Fri, 03 Feb 2023 08:37:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=uo1GTliUgPm7nrIzfzGoUx7qV5HnYVnG3FGG0iAmnxI=; b=nBRLSPM8jjKNwl9fDyNxnM1LPEq77wD7UVjI9p10YvfEWMQI/FpZbM9dUfNj2JDhit WyXwLhAnExui7L8LxGMy8zoLK9uNRSTN3/F+BxZgtsFiJkz/x0eaikoopGgT6qdWF86F +nNUnLkznOvLAoyfO2UQZ8P45rdiRVqRtku7f6h58AlXehyXefgom6P5A6otD7w49JEO 8lWVBZpZMqJOqBAQiHPisHeIHnfO/t/BE2cdksKfaWPDFj2YbBZ696RbWF1SOwvcXyB0 p1faSchKBbNk/rx4O2duLjv4bjfzuU6BNdh6ApI+qKgjQQ02Cu9bDIcggpC4WlzdjZ16 tnsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uo1GTliUgPm7nrIzfzGoUx7qV5HnYVnG3FGG0iAmnxI=; b=4MzZE0cjZcw2+S4mFEZV5oWz00HoV3ZL0vCDH05qf+drWteF6pEQmAJX3ptAUBoJgD aDtRZg6qnWmwYqOzEADWvmOOxSCMCyqttaKfbRohycN2OUELD4UdDi0HatVKPCXitijL 19GZhcE3g2mCk3JbfGARihUPNbzhY8sCK+vbaajthUplvpqHi675FBBbmeO+97Ef7ABO WQP7yWrxq1hM8ltQGj5C/pXA1Fn2FpDaCh7YfUabCJb6tK0gk2aPfMCtkyhk6/+fahJg nK31+YP2njkXwZ3A4UZPPUj0I2MYntROEcOa8tz+moQ/3UrW9TQv/oZ5feok6mfCYqyc uQ2A== X-Gm-Message-State: AO0yUKUbz72LCpvRNVKozujJjvhMpBOvEKXulRbwo6t9jrzzmarIEpEK cg+UijKtpzWj8+P/hvQLdD3AbB4L5kWBb/8U4GQ= X-Google-Smtp-Source: AK7set+4kNOUL8XebwFmfvKAfzHJoJ2tn5WjWJ96xfDWqouC7y/cethfhtjpDxMrWqccDpFOMzv/A1aTKneGmlw4gZ8= X-Received: by 2002:a05:6830:4109:b0:68b:cd8e:70ee with SMTP id w9-20020a056830410900b0068bcd8e70eemr572376ott.21.1675442219540; Fri, 03 Feb 2023 08:36:59 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 3 Feb 2023 13:36:48 -0300 Message-ID: To: =?UTF-8?B?TcOhdMOpIEtvY3Npcw==?= Cc: =?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?= , PHP Internals List Content-Type: multipart/alternative; boundary="00000000000056671105f3ce4a1a" Subject: Re: [PHP-DEV] [RFC] [Discussion] Typed class constants From: flaviohbatista@gmail.com (=?UTF-8?Q?Fl=C3=A1vio_Heleno?=) --00000000000056671105f3ce4a1a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Feb 3, 2023 at 11:34 AM M=C3=A1t=C3=A9 Kocsis wrote: > Hi Alexandru, Mark, > > > > 1. Why is object type not supported? I can't see a real reason and also > > there is no explanation why. > > > > Sorry for this, mentioning object as unsupported was an artifact from the > original version of the RFC which > was created back then when constants couldn't be objects. After your > comments, I removed the object type > from the list. Thank you for catching this issue! > > > > 2. In the examples for illegal values, it would be good to explain why > > they are not legal. > > I don't understand why "public const ?Foo M =3D null;" wouldn't be le= gal. > > I think "?Foo" should work the same as "Foo|null" that would be legal= . > > > > It was there due to the same reason as above. I removed this example no= w. > > I had updated the RFC page, but it looks like the changes were reverted i= n > > December 2022. The updated version I was working on was: > > https://wiki.php.net/rfc/typed_class_constants?rev=3D1648644637 > > > Yeah, the original author of the RFC was surprised to find your changes i= n > his RFC (https://github.com/php/php-src/pull/5815#issuecomment-1356049048 > ), > so he restored his original version. > Next time, please either consult with the author of an RFC if you intend = to > modify the wording, or you can simply create a brand new RFC - even if it= 's > very similar to the original one (just don't > forget to add proper references). > > The updated RFC looks good, thanks for working on it. You may want to > > review the revised version I had worked on for implementation ideas, an= d > > review the previous conversations. > > > > I also saw your proposal, but to be honest, I'm not that fond of the idea= . > This doesn't mean though that you shouldn't create a new RFC or an > implementation, as others may find it useful. If you kick off > the project, I'll surely try to review your work. > > Regards, > M=C3=A1t=C3=A9 Kocsis > Typed constants is a great addition, thanks M=C3=A1t=C3=A9! --00000000000056671105f3ce4a1a--