Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117407 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 57231 invoked from network); 23 Mar 2022 20:44:05 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Mar 2022 20:44:05 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B63561804B3 for ; Wed, 23 Mar 2022 15:10:54 -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.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS19151 66.111.4.0/24 X-Spam-Virus: No X-Envelope-From: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (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 ; Wed, 23 Mar 2022 15:10:54 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A6C355C00E9 for ; Wed, 23 Mar 2022 18:10:52 -0400 (EDT) Received: from imap43 ([10.202.2.93]) by compute1.internal (MEProxy); Wed, 23 Mar 2022 18:10:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=lxduaNz3bQa2wPH3C 6P27W6YSQ68jJe6Nn4c+mTQWXQ=; b=gaTR0GJzXHjiyIjMQoo32vxdHJGTUiMPk /f7791T+GP7i37aqpQeDqf8AsQz0hYrESNoXl4fhvc84pLJCRlwfAabUYpg+jVM+ +yOZ7BLflEe7vC7OcxwpDsePY+c53i+xpy4rYy1yI2iWdGC67V63QREYo0iSr+03 jRdqmpVn0kXj7IthgFXFob/h+4ouM/z4dddZy3qBr7CiMLwF78eTE+ah458/aqxV ylfRMXYwmZUgp83QxI1TtEsy5l7mtv1Z4+SvvoOIDgykkZLYu09D+kLVErCA7Ace +/5yKPftYgXBRzHvUfdrYbOtPCK9AvSaDZFmp5y7KEScUkHnWIllA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudegjedgudehjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfnfgr rhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtg homheqnecuggftrfgrthhtvghrnhepudehteettdetheetieehudehueekleejgfdtledt gfdvffeuveeiudffffekudetnecuffhomhgrihhnpegvgihtvghrnhgrlhhsrdhiohdpph hhphdrnhgvthdpghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 66397AC0E98; Wed, 23 Mar 2022 18:10:52 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-4911-g925b585eab-fm-20220323.003-g925b585e Mime-Version: 1.0 Message-ID: <76c399cb-fb29-4583-a212-8eb69740c96b@www.fastmail.com> In-Reply-To: References: Date: Wed, 23 Mar 2022 17:10:32 -0500 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] Typed constants revisited From: larry@garfieldtech.com ("Larry Garfield") On Wed, Mar 23, 2022, at 1:54 PM, Mark Niebergall wrote: > Hello All, > > In June 2020, Benas Seliuginas emailed this list ( > https://externals.io/message/110755#110755) to gauge interest in typed > constants. An RFC (https://wiki.php.net/rfc/typed_class_constants) was > started and had an accompanying PR (https://github.com/php/php-src/pull/5815). > At the time, Nikita Popov supported it for overall language consistency, > and Sebastian Bergmann +1'd it for overall language consistency as well. > The PR has since been closed without being merged, and the idea hasn't > progressed since. > > I'd like to revisit the concept, gauge current interest, and pick the > concept and work back up. Any more discussion items for or against the idea? > > I'm willing to do the work to pick it up where it was left off and get an > RFC proposed through the normal process, and a working PR. This is my first > foray into the PHP RFC process, and C code is not my forte, but I'll take > it on. If anyone would be willing to pair/mentor/co-author with me, please > let me know. Either way, I'll plan to work on it. > > This is the first of several concepts I have been tinkering with and seeing > practical uses for. The next phase of work with different RFC would take > this further with const inheritance, where const type must match. > > - Mark Is there a benefit to it other than "well everything else has types now, so..."? Even if it's esoteric, like in reflection-based meta programming? (I've been dabbling too much in that lately. :-) ) "Everything else does" isn't a compelling argument for me, but there may be others I'm not thinking of. --Larry Garfield