Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:121382 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 37954 invoked from network); 18 Oct 2023 12:26:41 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 18 Oct 2023 12:26:41 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1C8721804BC for ; Wed, 18 Oct 2023 05:26:41 -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, 18 Oct 2023 05:26:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1697631998; bh=9wBNGlvL5LyjcKmjGTAk9wYCmy6ZFm5wToINcPHf6ZM=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=Au9ILN9V9ANPXsgmMEXp8z6Y4uQmCovnKbgRr2zNJ7enz+oo46dvv6S3SLIb4t/Vw uA2wtxznhBM9tjRmO9m56/bzB5jrG7C6XHGZIeBJ0xzSpx16XLlOtGwcvpSsEgfSiz 0hsfMjo2EdkmX/qRfX/yk54PNmyihXTvtt+Ex2s/a2fj4cM0F/XWSyKi2YYoiA32fT GXXSTx4bknOA/HcLa9ERVCBrsY3zNJPrD8qodOAfD0pNPvGtd6HDcaFQ1kmHKk34xa mcj+7j0CfQGJuTYPZMy7FYOZnEajzWQbEGLtJe1rBpgCZMo7dwstowzbN1bguGeAkk +JH5uOpQ2EXGw== Message-ID: Date: Wed, 18 Oct 2023 14:26:36 +0200 MIME-Version: 1.0 Content-Language: en-US To: Daniil Gentili , internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Final anonymous classes From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 10/17/23 19:06, Daniil Gentili wrote: > Personally, I would have instead preferred the much cleaner approach of > making *all* anonymous classes final by default, (preferrably) without > offering the option to make them non-final. > > However, I understand that this might be a little bit too restrictive > for something that may have some valid usecases, even if extending > anonymous classes currently requires some hack-ish workarounds with > class_alias. > Perhaps make it two votes, each requiring a 2/3 majority? 1. Allow the 'final' keyword on anonymous classes? 2. Enforce that all anonymous classes are final? Best regards Tim Düsterhus