Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119778 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 70966 invoked from network); 29 Mar 2023 16:05:18 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Mar 2023 16:05:18 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2847D18054C for ; Wed, 29 Mar 2023 09:05:18 -0700 (PDT) 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,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS24940 176.9.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (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 ; Wed, 29 Mar 2023 09:05:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1680105916; bh=qazX6j/VJ5+0Hj+G70XBx7PwyFOeeSniY3DAY7NJ5Eg=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=PVDV2Gxnidk+9ADaJoy4FUhpp/z4lMIpoICHQO+H+tSMAYwtrHDeI7RpMZ33bMQBV NbEy0acKDIDdUna1zHGvU/XnqNsUjB5LcINC8Y2QLVJS19Z1BGh9d4wiKVhFkge9AA HDknfhq0lK1gtyu6gkQ/nyMphd2eYGF86U5dUmgmhvGSUfoDcexw6H6n7F6h23XLEh q0JAM6JOGre8Yjtdfu4tcNzHzTEZMoy5zyKqbNAaVZ3NGfyNbx1FkEa+5z8vagAua+ OIsHajrOhqDxgt/iIGbdLQjanrExPs+DWOy7BDWEzZrj7UmfiUcDJhmiZynH23GH4G cvHIQuqK69fwg== Message-ID: <1b0830a5-5262-d318-8fcc-fdba7d8a1b0d@bastelstu.be> Date: Wed, 29 Mar 2023 18:05:16 +0200 MIME-Version: 1.0 Content-Language: en-US To: internals@lists.php.net References: <8bbe91fa-9f32-e2c6-91b9-e982d25042ed@bastelstu.be> <09A79162-3FB0-4443-9654-CCECE0B9865A@cschneid.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [IDEA] allow extending enum From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=c3=bcsterhus?=) Hi On 3/29/23 13:01, Rokas Šleinius wrote: > There's a hypothetical (based on a similar real world problem that I > am facing) example for the use of extending enums in the OP. > > And I don't suppose Tim was arguing for not allowing enum > extendability, but rather contributing a real world example where > users who were having some totally legal fun hacking around with > internal PHP code would break said internal PHP code. I'm seeing that you already thought about the topic more based on the other responses. But for the record: I *was* arguing for not allowing enum extendability. > Which may or may not be a big deal from my uneducated point of view, > just saying :) And all could be prevented just by adding a `final` > statement to the definition of `IntervalBoundary`. > Requiring folks to add 'final' to their existing enums for them to behave as expected would be considered a breaking change. Best regards Tim Düsterhus