Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113037 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 82597 invoked from network); 1 Feb 2021 15:38:09 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 1 Feb 2021 15:38:09 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CD8541804D1 for ; Mon, 1 Feb 2021 07:21:07 -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.8 required=5.0 tests=BAYES_50,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_H2, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074065.outbound.protection.outlook.com [40.92.74.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 1 Feb 2021 07:21:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g5domLGxzjCFdjxYCxGXimtppZuwegKfitH7VWPb9otoMiNyumSSgKlkVktRWrC4ruMy7SSqtaGzaKGhdTbRC4mv0W+rwsk39PwLNmVjWRMCKV67Cju3/5ffbkQDtIyzKpl2G+KLYwCYaQXerHpUnuEKPSmM8gQGVN++rZI+eJXrBc4FYckIyOerzOUSCmbvpz25KC15HXT/KVODqPNUZKdnEHfUJ7Eg20Rc4rG+Dz559gl8vHd+nXSCnFnqb92aaZbD4XhSREWrO72WaCbdiGRLHA+5bZttTIo2tWIazbThwVtrEJ2TGNJTJU/ZKehrFCut0+TtkG+EGZMHteYG4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zW06AXtYHOebNzoRwYzezcUX5I2N5tWQna6GNZcl9PI=; b=GQdFrJKJSHzQ9x+BpRiN/vSSB56CgRoq4FrJNY/bC4zZfvXXfOnzeXgdD2WFf/oL37nu+n+AHVP4WMvVXk59Pw8nrvxnvzTAXZqLOu2Er3LCfc9MoKHhpteutWOdYNkZRGxpURL8wX/i59W05zMyaXiTTbpugg3QNEPg66m2+FWCWjyCWeX4DwWB9XKTOcb0kYFlu/CMpduULMpr+Zxy9cby1tO2Buu69rEthYZmtci/KPEj6IwWTR3TOwk+A8Ytp1cAOxL6fMWyT3HgbYRS7+c2hC42iWJXdoYGI8UZzKsBay14tJykIn9AKEsofiKWhsQY+qLdUJRWO/C0TKyCfw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zW06AXtYHOebNzoRwYzezcUX5I2N5tWQna6GNZcl9PI=; b=sUI/7cqe004FQsnlj87zzUnRUUAu0fxQNCzofHCu5QZsbZqJGATPn6BqzqccrIS7aNZMU5OxLUzJXg3hvIn/m5G1mhyq4Bh75q1RwIqV1dER7KpjnzS8pq3W2fyCBs2tGeFWZrh+5z8PME/iDb4esBcwkRtrKQuGPqFzBJ1Htm4fN/Di25Com2sUwLahoegj7nxPJ0kdzKRj9kgEz6Kabn4PO2Ujiqj8EDpTD0C578J4caWo6vGGRT6oWL2XzqoghMJ86KFm5iHB60Of2La8bybxKMXAbAzQUt0edRIer5JdBsyST6qGAA2QI6qJx7u8IYaxNK2D1oRVHpQM+TXc+g== Received: from HE1EUR04FT014.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::41) by HE1EUR04HT237.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::422) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11; Mon, 1 Feb 2021 15:21:01 +0000 Received: from VI1PR02MB4703.eurprd02.prod.outlook.com (2a01:111:e400:7e0d::52) by HE1EUR04FT014.mail.protection.outlook.com (2a01:111:e400:7e0d::164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11 via Frontend Transport; Mon, 1 Feb 2021 15:21:01 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:A02ACC3B6F298BD5C6FBA65A8F324B68BA33867F8A710AC87EDC5D8BC88C9F11;UpperCasedChecksum:52155B992334C9AD2F2129A78CF53F01AA7AC97092702D4500D93A31C2979402;SizeAsReceived:7657;Count:46 Received: from VI1PR02MB4703.eurprd02.prod.outlook.com ([fe80::e158:41d3:b378:86e2]) by VI1PR02MB4703.eurprd02.prod.outlook.com ([fe80::e158:41d3:b378:86e2%6]) with mapi id 15.20.3805.019; Mon, 1 Feb 2021 15:21:01 +0000 Message-ID: Content-Type: multipart/alternative; boundary="Apple-Mail=_13145F0C-430A-49F5-A6B3-8AA7169527FC" Date: Mon, 1 Feb 2021 16:20:58 +0100 In-Reply-To: Cc: php internals To: Larry Garfield References: X-Mailer: Apple Mail (2.3445.104.11) X-TMN: [wfdJnBgP+xK57vgjmfOq90fM1524Gr5rvkX4axgMoQs5G1wW7+BrGy13X5yH/MZ3] X-ClientProxiedBy: LO4P123CA0202.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a5::9) To VI1PR02MB4703.eurprd02.prod.outlook.com (2603:10a6:803:8f::13) X-Microsoft-Original-Message-ID: <515603DA-1040-4E59-9EF9-2EDFD71B4CFB@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [IPv6:2001:7e8:c83a:5400:e90e:fe81:be2c:8c39] (2001:7e8:c83a:5400:e90e:fe81:be2c:8c39) by LO4P123CA0202.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a5::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3805.16 via Frontend Transport; Mon, 1 Feb 2021 15:21:00 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 5f7f3073-b2c8-47eb-c782-08d8c6c4fb48 X-MS-TrafficTypeDiagnostic: HE1EUR04HT237: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lD2fYROXrTxTsQcaUqCccRfnR2Dke04qS7h6ZzX3s4GyxHYU/nV0dq/ML/6wTlpEm0XYlXvy2Cn0p8uFbp5dZSd8v4NS/f1kg/KO0eO3ZUNsgNg6zWSypS++A/QREDXC37Vn066sdZf3YpCf6MTcHB86dpS7y4VKJHKWCw33Xn2tHgZr3XNz239TxlNT0gU0zEIVjArMdJPXjQha5RdeWlLh8i3rQrAPjihDg7d3PbmcvU/MiPnz8JKCW/kQT/sZKGd4IFfV0ah1BWo7dpAC/rXmPkTYTd3RXkDr1N+X2emo11ALTY4IRYxiJis2Ead7uz44DuMU+FvRcTSeATkOfZP4YbWR7VfJ+obuACEyhMzhMTKhPrB6lRjL92nUtW9L09EU8+vUcPHYr7l88wgXtoXKgIt/J9smBcXW/pR0v9ajib+Ikb7yiBcikUn7Ne+A X-MS-Exchange-AntiSpam-MessageData: SvFhUbHWkJW4w+Ti+wp3gxEoX4HPJ5Tnggk1bQm3tkAAouuX+vJZR2ApyoDaUJ/JmrUK6CsndL0yTUu9rCGEwMz0DSzLPX1P+P1fgvXHHMPB6rVtRxUuaCeC1aK0cfsfluHwsmfkqD9W4DHuRR5kyD2TK7rFKnUWalna/gKYjyNU2VTHva1yzZiPLCLsmEfdcbcs0gXngvfAs8BZ6SUGaw== X-OriginatorOrg: hotmail.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5f7f3073-b2c8-47eb-c782-08d8c6c4fb48 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2021 15:21:01.5899 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: HE1EUR04FT014.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR04HT237 Subject: Re: [PHP-DEV] [RFC] Enumerations, Round 2 From: bobwei9@hotmail.com (Bob Weinand) --Apple-Mail=_13145F0C-430A-49F5-A6B3-8AA7169527FC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > Am 29.01.2021 um 18:15 schrieb Larry Garfield = :=1F=1F=1F=1F=1F=1F=1F=1F=1F=1F=1F=1F=1D=08=1F=1F=1E= >=20 > 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. :-) >=20 > 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. >=20 > https://wiki.php.net/rfc/enumerations = >=20 > 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. Hey, There is a single point in the RFC which is unreasonable to me, which is = barring static properties. I do not consider static properties to be handled the same than normal = properties. It's perfectly reasonable to prevent normal instance = properties if we want [pure] enums to be stateless (which makes sense). It however does not make sense to arbitrarily restrict static = properties. In the end a static property (on final classes at least) is = mostly a nice way to express global state, which could be written = "global $my_namespaced_enum_class_prop_name;" and used then. It's just = that self::$prop_name is much more readable and user-friendly, including = for types and static analysis. I also agree with Nikitas note that IterableEnum is really a suboptimal = name. If you want to highlight finiteness, maybe call it FiniteEnum. = UnitEnum would be fine too. Thanks, Bob > --Larry Garfield >=20 > --=20 > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php = --Apple-Mail=_13145F0C-430A-49F5-A6B3-8AA7169527FC--