Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119438 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 19386 invoked from network); 1 Feb 2023 06:21:05 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Feb 2023 06:21:05 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CD77818050B for ; Tue, 31 Jan 2023 22:21:01 -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-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 ; Tue, 31 Jan 2023 22:21:01 -0800 (PST) Received: by mail-pl1-f182.google.com with SMTP id k13so17522520plg.0 for ; Tue, 31 Jan 2023 22:21:01 -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=hkobYnVIie0UdDxnxZ3D6rOwKV/J0+3l4aKSGz1jKWo=; b=BM9eXtAqcXkVHHSiqmU2wA5O+eAgjsapk7oXi6P8paATrag3AB/slydA0IBKSVRjZs VilLpp4BfFMFRSmmfTyf6EA5saoO4etto1k/Hca9zkh/vghesewubERu8Is4MQRqxqIZ FwrHZIKLqRDGo2F4XRRkUTgKbvpOmME5BHVekHpl16+NnsyDwHJAZsuGKXgX1Rpuo85D jXfaF6k60aO26m1zZxHckuViZmtYKcUroKm1qK0t5pOKVjamtX79ROQ8PPsJxXWTgQIh S5hFeNydP1nWHaQ3rpT3he7GOSA4dOhrOrR7lPHCXyDdHrNu7jDM+YMZzLeytWFxP2JG ftJw== 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=hkobYnVIie0UdDxnxZ3D6rOwKV/J0+3l4aKSGz1jKWo=; b=hw2/p0pZDbBPeeHqRGEhLT4/RFJ7WaFae+UDAdg55QRDeOY//HhKGc9BcgrUXi/1vJ HlGQloIxdiNXmKZW6PjLwnAAw7SsWVvyGXHqNgGkakMjjhNAVxS3mo5iWelycApJdXr2 Izrut3liB2gy0+mpod+MATSpNGoi0M6HvLaNiQs1cDebTf0Kb/j7it4dRdlYPHxcvBut 1pri1LL5MciAxSHLTr6HWig7AXkenrIA9iP70ukwkGxW51PB8VyfrsYNzoNjQH8VVwoU LdipE8baHD8Br1Mrn2RgC45BQY8iA0Ml0wWjAmGzpQS2+/CrVELZCLRbXKbHriSAzPjv 51Ng== X-Gm-Message-State: AO0yUKV+qDAIQvxnctgBUO94y9cvJJRI0pt1vc3W8NxDd9S3AzgIh4cd ig4nLdlOZHHdYPgKOc5yVwKd5pOJzRwgY70Jf68= X-Google-Smtp-Source: AK7set96Wi+YTSwWqPPk+kJRRelTKsq9MfoqyredVUhNg/8aLIipbKhLSHTaNKU7t7rOMOOxwN2NPXl55kh1Vc71Ofw= X-Received: by 2002:a17:90a:88e:b0:22c:9a7f:a170 with SMTP id v14-20020a17090a088e00b0022c9a7fa170mr209400pjc.12.1675232459970; Tue, 31 Jan 2023 22:20:59 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 1 Feb 2023 08:20:43 +0200 Message-ID: To: =?UTF-8?B?TcOhdMOpIEtvY3Npcw==?= Cc: PHP Internals List Content-Type: multipart/alternative; boundary="000000000000b1614e05f39d73aa" Subject: Re: [PHP-DEV] [RFC] [Discussion] Typed class constants From: drealecs@gmail.com (=?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?=) --000000000000b1614e05f39d73aa Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jan 31, 2023 at 11:01 PM M=C3=A1t=C3=A9 Kocsis wrote: > Hi Everyone, > > A few years ago, Benas Seliuginas announced the "Typed constants" RFC ( > https://externals.io/message/110755) which apparently had a > positive reception overall. > Unfortunately, there were some issues with the implementation (namely, wi= th > the parser) > so the RFC was stuck. > > A few weeks ago, I reached out to Benas whether he intended to resurrect > the proposal, but > due to time constraints, he couldn't, and was OK with me continuing it. > With some help from > Bob Weinand, I managed to overcome the implementation difficulties, and > adapted it > to the newly added type-related features. > > Please find the updated RFC here: > https://wiki.php.net/rfc/typed_class_constants. > > Regards, > M=C3=A1t=C3=A9 > Hi M=C3=A1t=C3=A9, Looks great! Two small things: 1. Why is object type not supported? I can't see a real reason and also there is no explanation why. 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 legal. I think "?Foo" should work the same as "Foo|null" that would be legal. Thank you, Alex --000000000000b1614e05f39d73aa--