Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112449 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 11756 invoked from network); 7 Dec 2020 09:01:57 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 Dec 2020 09:01:57 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 635331804C9 for ; Mon, 7 Dec 2020 00:30:47 -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.4 required=5.0 tests=BAYES_20,KHOP_HELO_FCRDNS, SPF_HELO_NONE,SPF_NONE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from processus.org (ns366368.ip-94-23-14.eu [94.23.14.201]) (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 ; Mon, 7 Dec 2020 00:30:46 -0800 (PST) Received: from authenticated-user (PRIMARY_HOSTNAME [PUBLIC_IP]) by processus.org (Postfix) with ESMTPA id 6072F5101324; Mon, 7 Dec 2020 08:30:44 +0000 (UTC) To: Paul Crovella , Rowan Tommins Cc: internals@lists.php.net References: <32277b43-079d-4cd7-a159-8ad555096742@garfieldtech.com> <31c9d66b-771a-35ed-1b11-c681bbcc02c3@gmail.com> Message-ID: <3f00c94d-b243-2b4e-c233-7aa5f454e61a@processus.org> Date: Mon, 7 Dec 2020 09:30:42 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Authentication-Results: processus.org; auth=pass smtp.auth=pierre-php@processus.org smtp.mailfrom=pierre-php@processus.org X-Spamd-Bar: / Subject: Re: [PHP-DEV] [RFC] Enumerations From: pierre-php@processus.org ("Pierre R.") Le 07/12/2020 à 02:00, Paul Crovella a écrit : > On Sun, Dec 6, 2020 at 7:12 AM Rowan Tommins wrote: > Longer term plans are irrelevant except to avoid inadvertently > shutting the door on something. This RFC is up for discussion, and > will be up for voting, in isolation. It has to be able to stand on its > own. I strongly disagree with you. Something as important as new type-related paradigm must be considered along its full roadmap. This enum RFC tries to prepare the future, and if it wasn't, tagged unions and ADT wouldn't be possible at all. Since they are all sensible changes, having a roadmap is what makes all consistent, it must be considered and discussed along its global roadmap. You probably should consider that enum cases using singleton classes only as being an implementation detail, not a high-level design choice, if you start to mix up real classes with those enum cases, future low level engine or compiler improvement, for performance or consistency, will not be possible anymore because people will be stuck in using them as classes, which they are not conceptually. Any failure in considering the future will result in a tight awkward situation were improvements will not be possible anymore. Regards, Pierre