Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112443 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 28547 invoked from network); 6 Dec 2020 16:20:15 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 Dec 2020 16:20:15 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A86631804C9 for ; Sun, 6 Dec 2020 07:48:58 -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.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) (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 ; Sun, 6 Dec 2020 07:48:57 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 099EAAE8 for ; Sun, 6 Dec 2020 10:48:56 -0500 (EST) Received: from imap26 ([10.202.2.76]) by compute4.internal (MEProxy); Sun, 06 Dec 2020 10:48:57 -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=aVATZd 3/ZDKeQsAXZI+hwFirim2/BMG5ZOzPnhHTP34=; b=Ch4Nd3/XL9aGBfBFrLTqsq YJhYmLo9Jt0QIzTD0OBrWL8FCE0m25gGCcGyuMIlxmdYnLZxls0hGZZ8wufHhD9c IPbLQlqPgAMVmScDEpF8XwN6d2LEdKKdKRheDC5HSBMs3SVpTkvWpyc/xFwVrCrg a523OX6LoSIHYWQ9OcWFH7u5N3pAQmipmvBewpjGnCOaOAy/Z0M/65ITfZVzTKzF sllBOwj5cydwmASsqobI4CtCvIWNA2aVfm/ve4GA5FTb/uBrzWBQaIR0lJvEgX8b 8PkmlPhG8v5s4kFIo6kmX6qr0G7N3IZUGpWETuI5dgsjsemSwLpj3viQMYStx+bQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudejvddgkeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdfnrghr rhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hmqeenucggtffrrghtthgvrhhnpeevheehvdevjeelvdevgfelvefftdejkeelvdekgeeh fffgiedvjefhhfeltdduteenucffohhmrghinhepphhhphdrnhgvthenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihsehgrghrfhhi vghlughtvggthhdrtghomh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 310D114200A2; Sun, 6 Dec 2020 10:48:56 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-622-g4a97c0b-fm-20201115.001-g4a97c0b3 Mime-Version: 1.0 Message-ID: In-Reply-To: <31c9d66b-771a-35ed-1b11-c681bbcc02c3@gmail.com> References: <32277b43-079d-4cd7-a159-8ad555096742@garfieldtech.com> <31c9d66b-771a-35ed-1b11-c681bbcc02c3@gmail.com> Date: Sun, 06 Dec 2020 09:48:34 -0600 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] [RFC] Enumerations From: larry@garfieldtech.com ("Larry Garfield") On Sun, Dec 6, 2020, at 9:11 AM, Rowan Tommins wrote: > Note that Larry's longer term plan is for "algebraic data types", > including "tagged unions": https://wiki.php.net/rfc/adts Unlike > straight-forward enum cases, these are not singletons, and each instance > has its own associated state. I was going to respond, but I think Rowan summed it up here. Stateful enums are called tagged unions, and that's a separate phase to keep the implementation and discussion focused for now. We hope to add those in the future, but for now unit and scalar enums have a ton of value unto themselves. --Larry Garfield