Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112418 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 31792 invoked from network); 5 Dec 2020 02:09:35 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 5 Dec 2020 02:09:35 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2F4161804C3 for ; Fri, 4 Dec 2020 17:37:54 -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.2 required=5.0 tests=BAYES_20,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-f172.google.com (mail-oi1-f172.google.com [209.85.167.172]) (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, 4 Dec 2020 17:37:53 -0800 (PST) Received: by mail-oi1-f172.google.com with SMTP id s75so5309072oih.1 for ; Fri, 04 Dec 2020 17:37:53 -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:content-transfer-encoding; bh=gNqQvd9s2ahS2CXsV/SGqXiq/FEfUks7d4XgvpOyUrg=; b=NsDgJ4K8zEzjyoGBZEkDKXFJtiNgMSrgNDvWCV6xz/6PP+vRstUyM2tjmWBQreJIrF vV4vy0sPnZ1dCuehqkEitKZdYdQ4ouNF1xheZGZsQDJ77mpMFamMAQVdfPgXuVgTwrhx 9073o/EMwS5ZpxFpCq/zkdtO5yQ57lljOtRSzNQtFdninw3hbhLYZvUpF/RWOHwwxGP9 nIPrChJHdij2eaWZTpw/f21HcjvpG2DladjFteAoWovT+dQm39UGHrDIuBYSQIMJrtgS 6rMolm8Sn8QbFuV6vZWu0mGe9QXfvQidx9xbpf0gPKhxlkFUPPp1VPh6LS413bWJDBVx YA6Q== 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:content-transfer-encoding; bh=gNqQvd9s2ahS2CXsV/SGqXiq/FEfUks7d4XgvpOyUrg=; b=VofE2BHJu+f3Vw4rSgQI3q4XCnX9qoN4HBqLkl5dlIyxKrmP29CD/gger33RzSyCFS dq3NTIh/U6OqJKESfUs7ObQx6/CYPQS6s/J0Wk3qJNAtZOh9QtzY3yZo8DToDiaezWSl 8W1L7Vg3wh0xxGjwAj2y03sdJPkI4Lf5Z2Sc/TobOGaxDhQ12lZMp97D6/VPKso/CgLg 5rchEF4R0F6/GngjGxA2JDv/GZgdYSKvYI29Z+lYq4JjP4DEexvsnA4RrA2iaxdrfTxf qlqzXWd11hTynuITx7jIr1Jf/UAQpO4l3Mqs+g6MmjXCcWD8mQJ9+jaUhDK6XMvMr3NT cvNQ== X-Gm-Message-State: AOAM532XtXYsSB5cfzkoVk94sFjOzBTHqRu5fTZ6fHtvSeAmBYPPTQtS 0PWH+5kdpy2R1VnHkln6NSmJWORnS51gobY4pw7cgXPwZLCY X-Google-Smtp-Source: ABdhPJw5Cwa4Bs5GJQWmpbpIDlhCjLxfvEAO5Fz24i0SPsyQ6+aKtSkflYLnMw2hD2hMYNsB9fbAGiTTJpv59oVYVfE= X-Received: by 2002:a05:6808:9b7:: with SMTP id e23mr5105280oig.167.1607132269917; Fri, 04 Dec 2020 17:37:49 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 4 Dec 2020 17:37:37 -0800 Message-ID: To: Larry Garfield Cc: php internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Enumerations From: paul.crovella@gmail.com (Paul Crovella) On Fri, Dec 4, 2020 at 3:25 PM Larry Garfield wrot= e: > > Greetings, denizens of Internals! > > Ilija Tovilo and I have been working for the last few months on adding su= pport for enumerations and algebraic data types to PHP. This is a not-smal= l task, so we've broken it up into several stages. The first stage, unit e= numerations, are just about ready for public review and discussion. > > The overarching plan (for context, NOT the thing to comment on right now)= is here: https://wiki.php.net/rfc/adts > > The first step, for unit enumerations, is here: > > https://wiki.php.net/rfc/enumerations > > There's still a few bits we're sorting out and the implementation is most= ly done, but not 100% complete. Still, it's far enough along to start a di= scussion on and get broader feedback on the outstanding nits. > > I should note that while the design has been collaborative, credit for th= e implementation goes entirely to Ilija. Blame for any typos in the RFC it= self go entirely to me. > > *dons flame-retardant suit* > > -- > Larry Garfield > larry@garfieldtech.com I'd like to see the specific reasons for the restrictions listed in Comparison to objects[1]. In general if something's value is even debatable then the default position should be to remain consistent with the rest of the language. It should take a strong argument to introduce any artificial limitation and it's useful to have that in the RFC. [1] https://wiki.php.net/rfc/enumerations#comparison_to_objects