Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112697 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 81251 invoked from network); 31 Dec 2020 13:11:38 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 31 Dec 2020 13:11:38 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id ECE671804C4 for ; Thu, 31 Dec 2020 04:46:34 -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-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 ; Thu, 31 Dec 2020 04:46:34 -0800 (PST) Received: by mail-wm1-f42.google.com with SMTP id 3so7179145wmg.4 for ; Thu, 31 Dec 2020 04:46:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=B4Xk154UbVvgJQA06IpBzjUXeJ9uoPudH2HiZxt3VJo=; b=Ho9F7ZCukwUZ2gHgJkmovYz7K6ULzQpib35U7VTtn3SMnwVpbmW2sMggT1N0Rh1gJ4 PqQvqn9Uf5rneMt/cRwAJCqy48x4bPCwRhNpk4ywZpXEJx8qzUlj3ClFA0DVetNK2byB prHyMHszI8TOpUEa7KTWSYQCptwU8NnAVFkaeOA8cKWuGyMMUBFCLpsaUcYTrel5GDlN ZIxXsH4JNUEiwJqH9WSkSzo7dhSlYbl7EbwwgkFhb3RwYI2+WbgvorRGtOCwhcHqmiAK US16ODd2ewTD2BTz62JSLR26IWsw4IPmGLIVd2d0n9bH0rk8Q5mHiL0tkbS3U2ExauX4 o9gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=B4Xk154UbVvgJQA06IpBzjUXeJ9uoPudH2HiZxt3VJo=; b=TFd+G598jq3YdbfZbRCJfSy6JRbGsbScJcQ9tJ5DwA+ULXBpqq1dyThE2QVALrdxIE E+YM8RUthfTnLi3Dfu9HH2rcHtpAiUHjCWNC014lN8PiBYr4RfwFCWXMnnfY7op6oVbC J+DYw2Zqej8LfJLuXZFEdG08gPvbC3711sj7j4hoWIz5c5mGdywgYAfbWr+HpTrIqBDt P3krzwKq+gfc2pmtmTP0O8axnXo6NVqeg+8hlnzj27JriljW+BxjDw3IBih3bdbBVk/E s3T9rzpZRzVNGf5nxJynLRfYdcjaBLHeuIM2TbwHstN6eHD/ERymInT6lJiElS4ZUPId iv0A== X-Gm-Message-State: AOAM533vGdSgLx4wV2bCyxhMiHOPwqNcGIStIzVyNKrZ4i5ANXDtMNvQ tmY7fBf1ciwWYFcuttB+TTzA44EmwX8oMQ== X-Google-Smtp-Source: ABdhPJxoMwkvs1O5okwx+HorqydOH9asb4O6qEVKt/kCVDHexnexp4kYPoK3LV1Zfc42ukAqsliEDQ== X-Received: by 2002:a05:600c:40ca:: with SMTP id m10mr11618785wmh.54.1609418788557; Thu, 31 Dec 2020 04:46:28 -0800 (PST) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id c16sm48802916wrx.51.2020.12.31.04.46.27 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 31 Dec 2020 04:46:27 -0800 (PST) To: internals@lists.php.net References: <012f426d-ff07-fce7-d642-c64bafa5aaf5@gmail.com> Message-ID: <30d81afa-f7f1-97fa-123c-1d131d5113ee@gmail.com> Date: Thu, 31 Dec 2020 12:46:27 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [PHP-DEV] [RFC] Enumerations, Round 2 From: rowan.collins@gmail.com (Rowan Tommins) On 30/12/2020 19:47, Larry Garfield wrote: > That's partially left over from when we had per-case methods, where grouping would be highly fugly. However, I'm still advocating for tagged unions (in a future step) having per-case methods, and that would make the grouping syntax fugly again. It's trivial to add later, so for now I think it's best to skip. If we find later on it doesn't get in the way of anything it's an easy addition. Yes, that had occurred to me. Just to reiterate, though, the original justification read "it is unclear how common [cases without block definitions] will be in practice"; with the current implementation, we know for a fact that it will be extremely common - even if tagged unions use overlapping syntax that doesn't group nicely, every "unit enum" will have cases with no blocks. Still, it's not a big deal either way, and as you say can easily be added later. Regards, -- Rowan Tommins [IMSoP]