Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112448 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 75511 invoked from network); 7 Dec 2020 01:39:03 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 Dec 2020 01:39:03 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C34331804C5 for ; Sun, 6 Dec 2020 17:07:51 -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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) (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 ; Sun, 6 Dec 2020 17:07:50 -0800 (PST) Received: by mail-oi1-f179.google.com with SMTP id p126so13664936oif.7 for ; Sun, 06 Dec 2020 17:07:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=twkhGl7kFdtUFTSfeiZPJL0hWBerItc4t6KfsGx0FKg=; b=BM8PnJT0GXPbuszSe4enIVolQEFJHh4yNYtdcHykM7fYc39eh/i+PvzmlfnT9PvSFQ viq9jAAztpwREAWEqVFxNOgiIW97gqY9ikFJ8IJuBaJXm4ZQSqd1RV2Wo4aLsy4kAoo6 auZrVjQTZsazn51G4A6VzW7Z1Pnim/5BhVMeTiLuEEfA5b0I4YYZvn9oxI5muBngE3L7 8BQg/Fq/ntnVMisYp75hUOJVhFHAxwFCJu2wRSSqD+GQyqq20oWXLzhtsGGQNcazgwLm haBAyu4WCxwGLRZaSvAx1ipXesH1ZHnfk8n3uXFjtxIS9hqnreGjnXDc3ain7kk3QN+L JSqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=twkhGl7kFdtUFTSfeiZPJL0hWBerItc4t6KfsGx0FKg=; b=YeVyMKqI6/loXZTubQPCeY2LyBKlNEAHjVI2qox/nbTkysaPoF7tmxybNc6ml3LqOq ZmrcD1BLA+bLdPe8DE6ZZKxRSV6nFJcritE+/abd2dwGV+VLo9tSZF8DxDiYG7ywatU4 bPVqECVnpY1uXP0r7aaYl1Z71qTXm/f3tIi/pg15rgpGFCajQbJl9pRk0yendqcAX58+ ogtVOOCuVCLEj19F44lU1Fbe4gEMUIDOqvbFm7akm9uQeWXMH8Up57q6dfvwu8WtLjUJ TJcD9DydlLllwvBoef7rB61YLYQUdOTsmhHlsPzwNIT+0id1tHGL3uRD3ZYEGZWeWris 7gJQ== X-Gm-Message-State: AOAM531kx68v5wZToZ7GVZml4ELnA0Ixnm5C90ObIG9HN92sjKbf3Jsj opEKm9clGv/k2pA7Sl7bgTv85GZbAU0pRjnsYIVSj9qY/g== X-Google-Smtp-Source: ABdhPJwY1lopnbKcycIimkGXr3HAlrF0zvvtKKfQzyM5LhzxmJkNp5VVXFQxUCvVXxi1g11pmLpSfUQkuIutIBNIfh8= X-Received: by 2002:aca:afd0:: with SMTP id y199mr4101156oie.7.1607303269971; Sun, 06 Dec 2020 17:07:49 -0800 (PST) MIME-Version: 1.0 References: <32277b43-079d-4cd7-a159-8ad555096742@garfieldtech.com> <31c9d66b-771a-35ed-1b11-c681bbcc02c3@gmail.com> In-Reply-To: Date: Sun, 6 Dec 2020 17:07:38 -0800 Message-ID: To: Larry Garfield Cc: php internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] Enumerations From: paul.crovella@gmail.com (Paul Crovella) On Sun, Dec 6, 2020 at 7:49 AM Larry Garfield wrote: > > 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. That's disappointing as he didn't even attempt to address the majority of my concerns. > Stateful enums are called tagged unions, and that's a separate phase to keep the implementation and discussion focused for now. I am only talking about the RFC you presented, you and Rowan are the ones bringing up others. > We hope to add those in the future, but for now unit and scalar enums have a ton of value unto themselves. > > --Larry Garfield To be clear I want enums in PHP, I think most people do, which is why I'd like to see this RFC improved.