Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119458 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 22985 invoked from network); 3 Feb 2023 14:34:22 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Feb 2023 14:34:22 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8893E180538 for ; Fri, 3 Feb 2023 06:34:21 -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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, 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-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) (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 06:34:21 -0800 (PST) Received: by mail-ot1-f45.google.com with SMTP id 14-20020a9d010e000000b0068bdddfa263so1397171otu.2 for ; Fri, 03 Feb 2023 06:34:20 -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=QQToeTjDDMQvHZ0zS0IcZkZnU5f2TO/86kfJCONXgU8=; b=IAEx2Sa7oZy8I8GGKr89MM59IPEWVbhjE3ZoC2ThxlmJIK7Cu3fyS5UsOUYMwzZZAv yHOtG1khd0VnyIuqxBN1QCguvRPPbTNzQ0lTAPTc5kjQ8h9ZHi3ygP+M5XkxE5ud2vd6 /RnipObtiKb8gBXsyrvPTM0ObiH3H0S6WZA/WhMXMPESGU3lsVAYf7EnvzkuSEoSYY51 o1ufa/PlLJWIoNS9N52iQ9GNHa8pPKuHQlZ/AdEnq+/lzah+hTe9oIoTejvuVRnFaroZ hffbSy7TmhtpvRf5jyqgw7kJEZvdp6u7DElJQ+WgnG7gcDzycyg7MA0KDVN5Zbpz9ZyI UXUg== 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=QQToeTjDDMQvHZ0zS0IcZkZnU5f2TO/86kfJCONXgU8=; b=Fw6Kr6nXmL80hFZlPEkJuu764njlRt2NQWbuINxgipp42iZL0FgOE2p/fZ/q1/OM2L blSsbgryykarwalQVz8ePUKIj3J7uBO/zy+t8lucXAIjzEon51rDIiLha962JRFIN5BC 0Gm/71sNy9kSO6rUy65Q6eaJya1eoNU9qjKvn9qRkJLDREMMq+YgM4y+Y6p3P/ATcMkl +fqGEksQypRWRWAOjyVq785HMobInvpb8vHRhAxPesgN6BnRjgkRB94mUHcgZV33sUbN pe9HJaVS/ntgD5CyEfMGN7y/OxbF3HQ/SzofX7aHEcGjFCsWCIvaRcQ/Q/HMYI4JX7Sw nr0Q== X-Gm-Message-State: AO0yUKXNK7serLUtiOeoGDNau64cvFBnCasKBVwZi+aTqUoGraURVYds y4Z77uGt6Genv6u3OQuNnhOFrj8Y5fij5h1yaYgiAOaJS7s= X-Google-Smtp-Source: AK7set8Et7s1Nhmvidi2a0lTNcGWBhrwT/EZYP5msMpxiOvtlSM/mn9NN1uRewMBrersGAx36h6xHFD6I+LhLf8ccR0= X-Received: by 2002:a9d:7258:0:b0:68c:c58b:2a9 with SMTP id a24-20020a9d7258000000b0068cc58b02a9mr495043otk.52.1675434860277; Fri, 03 Feb 2023 06:34:20 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 3 Feb 2023 15:34:09 +0100 Message-ID: To: =?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?= Cc: PHP Internals List Content-Type: multipart/alternative; boundary="000000000000b0f5da05f3cc9352" Subject: Re: [PHP-DEV] [RFC] [Discussion] Typed class constants From: kocsismate90@gmail.com (=?UTF-8?B?TcOhdMOpIEtvY3Npcw==?=) --000000000000b0f5da05f3cc9352 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 lega= l. > 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 now. I had updated the RFC page, but it looks like the changes were reverted in > 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 in 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, and > 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 --000000000000b0f5da05f3cc9352--