Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113024 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 53178 invoked from network); 29 Jan 2021 17:35:29 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Jan 2021 17:35:29 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 770071804D1 for ; Fri, 29 Jan 2021 09:17:45 -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=0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (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 ; Fri, 29 Jan 2021 09:17:44 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 9DAEC12B5 for ; Fri, 29 Jan 2021 12:17:43 -0500 (EST) Received: from imap26 ([10.202.2.76]) by compute4.internal (MEProxy); Fri, 29 Jan 2021 12:17:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=d3lCcR B0aOB7OXzDdmB16HG+CbdfkBBqQJOoCaMGLYU=; b=kumYqKNMRhlbApO8hMy3f1 jvOajrQJ2P1BLqygq2H7TOL6q+1f60r/7vpJu0FhxZW5uWUSCEiWKfJ28qDk5tqk rz962xARGdWzGUfjdbSeaqstXTP0ZctvIjF3ipFBvlo2ywuPLzalbZ7mvAll4Vnb t5dnPBL0BGSaL3mX9ZQhLD00COT5VuaeImM5VwDHlwpHsAy9gITWDUXZmc+dO2FX bXcq9+XPGF3oOtx4zCi3vYNBEj7h16MD0E5ktPB9FoyQl4p/BlzGcevh4X11adfZ y/IE1Q+F8T7kKPnBU+fM2rNJH3iawwt6hRb2OCSGV2ngGdLax00PPvkaOJmmMRTw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedvgdellecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsehttdertderredtnecuhfhrohhmpedfnfgrrhhr hicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh eqnecuggftrfgrthhtvghrnhepveehhedvveejledvvefgleevffdtjeekledvkeegheff gfeivdejhffhledtudetnecuffhomhgrihhnpehphhhprdhnvghtnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheplhgrrhhrhiesghgrrhhfihgv lhguthgvtghhrdgtohhm X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id D26E714200A2; Fri, 29 Jan 2021 12:17:42 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-84-gfc141fe-fm-20210125.001-gfc141fe8 Mime-Version: 1.0 Message-ID: In-Reply-To: References: Date: Fri, 29 Jan 2021 11:15:28 -0600 To: "php internals" Content-Type: text/plain Subject: Re: [RFC] Enumerations, Round 2 From: larry@garfieldtech.com ("Larry Garfield") On Mon, Dec 28, 2020, at 2:21 PM, Larry Garfield wrote: > Hello, Internalians! > > After considerable discussion and effort, Ilija and I are ready to > offer you round 2 on enumerations. This is in the spirit of the > previous discussion, but based on that discussion a great deal has been > reworked. The main change is that Enumeration Cases are now object > instances of the Enumeration class rather than their own class. Most > of the other changes are knock-on effects of that. > > Of particular note: > > * Cases may not have methods or constants on them. They're just dumb values. > * Enums themselves may have methods, static methods, or constants. > * Traits are supported, as long as they don't have properties. > * The value() method on scalar enums is now a property. > > The full RFC is here, and I recommend reading it again in full given > how much was updated. > > https://wiki.php.net/rfc/enumerations > > The implementation is 98% complete; there's still a few lagging bits in > reflection, and some opcache bugs that Ilija is still stomping on. > > There are a few outstanding questions listed that we would like > feedback on. We're not entirely certain which direction to go with > them, for reasons explained in the RFC. Input on those is especially > welcome. > > Happy New Year. May it be enumerable. And we're back again. The RFC has been updated with a steady stream of smaller improvements based on feedback and testing, and is now in its Final Form(tm) (we think). The only major change worth noting is that we renamed things. :-) An enum with no scalar backing is now called a Pure Enum, made up of Pure Cases. One that does have backing values is called a Backed Enum, made up of Backed Cases. That change is mainly to allow for future expansion to non-scalar backing static values, should the use case arise. Reflection was also reworked a bit to make it more logical. https://wiki.php.net/rfc/enumerations At this point, Ilija and I consider the RFC done and ready for a vote. Baring any major issues being brought up, we plan to start the vote in the first half of next week, probably Tuesday-ish. If you have any other bug reports or tweaks, please speak now or forever hold your patches. --Larry Garfield