Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114180 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 11288 invoked from network); 26 Apr 2021 07:37:54 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 Apr 2021 07:37:54 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1F5BD1804DF for ; Mon, 26 Apr 2021 00:41:53 -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,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-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (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 ; Mon, 26 Apr 2021 00:41:52 -0700 (PDT) Received: by mail-lf1-f43.google.com with SMTP id y4so46604767lfl.10 for ; Mon, 26 Apr 2021 00:41:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=qazDy5VbmiOR67f4hMISHYjLPpfjnBvIWQw02GWZFnU=; b=uNpAmSOT2BQWqmpEvYTebA6/wll5alntnK35mlgTHNUx7JhX8bSR4v5T3eDLTmsXWO JbnRh/raTrfvro/2qfQ3/8aVJ4j2wf3KuZ5/wcbV3UtRDzK7msMYOBVlzrsROh5vxG6g rIka2GFl2X0ee6AuTvgsMfWdkUPhGt4Ly3AwaZjpjKhnRP/7nI74NmR0dkZCJsPOLWwE kHM2TUjXc5WnlNUTIEesCHKNAGqFbCd5yPJecT202zyh+NHu89X3PR7uxleuvAZBNLk3 /TRJU3QC+0wuS1PszvW50auXG+OYuhEX4gemrU8O9GhjSGYcZSM2jloGxat/3t890val mQqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=qazDy5VbmiOR67f4hMISHYjLPpfjnBvIWQw02GWZFnU=; b=h4/tkgjUKzXbes7SWSf7CamiGSavtKG+YAo28u+7ztr9e7BgFgJRH88tV+VbFtdiyj UmdQxXlphqao9btRpnkjJN4wkJrACk6iTpCP7c5VO9EILeCTT6HgRt7q5QI6ikqlqrom DgGde93H5lIA8Ud8P1fXZfd+03RSUfXZoK4/fj4k+9cQKsP0lE8fVtskr4H0yqFvJIhz nNEoU/urAAEtabzykgnniGsxE6mnKD4CPieBUYY7wFy5dLeQOlzJaKlJd32GMzXqzC1P I8nijdAkN05bAGAJf+hAn4B9zJLnHmzmz7jKGMchf/rWvfRhwDL8/ZBOc+ISLc5gM8+0 EPGQ== X-Gm-Message-State: AOAM531WHXnvxELd6fucUuJ42M9m5V6dvk+LhvwQmECa+yGrhOqouBKy Tz1sQgYz33F+8DEsCVHaTlVAFlZc7R6ve9P3WDPia4SG X-Google-Smtp-Source: ABdhPJxOFxVl/SyRG+uxl82tuiCCV3Q6Bx3civUtRI675V68kBt1GFxuoO5BfJs63gGPNf188V6yznJl2gD6du4IBqU= X-Received: by 2002:a05:6512:b1a:: with SMTP id w26mr11680268lfu.418.1619422909654; Mon, 26 Apr 2021 00:41:49 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab3:4e13:0:0:0:0:0 with HTTP; Mon, 26 Apr 2021 00:41:48 -0700 (PDT) In-Reply-To: References: <5b9f1500-615a-48f1-815f-1d48b327ef90@processus.org> <179049b1475.11134368b213512.254739612773841999@void.tn> <0BF84585-DDC3-4B25-BFD2-D8B916D135EE@newclarity.net> <015f6acb-eece-93c4-fd0e-0b54acd7170e@processus.org> Date: Mon, 26 Apr 2021 09:41:48 +0200 Message-ID: To: Pierre Cc: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC][Draft] Sealed Classes From: olleharstedt@gmail.com (=?UTF-8?Q?Olle_H=C3=A4rstedt?=) 2021-04-26 9:37 GMT+02:00, Pierre : > Le 26/04/2021 =C3=A0 09:35, Olle H=C3=A4rstedt a =C3=A9crit : >> 2021-04-26 9:22 GMT+02:00, Pierre : >>> Le 25/04/2021 =C3=A0 21:22, Larry Garfield a =C3=A9crit : >>>> Stitching together 2 replies to minimize thread noise... >>>> >>>> On Sun, Apr 25, 2021, at 11:58 AM, Micha=C5=82 Marcin Brzuchalski wrot= e: >>>> >>>>> Speaking of Attributes I prefer not to use an Attribute for any >>>>> particular >>>>> language feature which expects input arguments to be a valid class or >>>>> interface name for two reasons: first because there is no effective >>>>> way >>>>> to >>>>> restrict input string to be a valid class or interface name and secon= d >>>>> that >>>>> it'd require passing strings which means in most cases passing class >>>>> or >>>>> interface name with magic ::class constant read. >>>>> >>>>> Cheers, >>>>> Micha=C5=82 Marcin Brzuchalski >>>> That's actually a pretty solid argument against attributes here, >>>> honestly. >>>> Consider me convinced, and now in favor of "final class Foo permits >>>> Bar, >>>> Baz". :-) >>>> >>> Yes, even though I was the first mail suggesting it in the beginning, >>> this is a solid argument which actually do change my mind. >>> >>> In the end, I like the `class Foo permis Bar, Baz` syntax, with a singl= e >>> keyword added. >>> >>> -- >>> >>> Pierre >>> >>> -- >>> PHP Internals - PHP Runtime Development Mailing List >>> To unsubscribe, visit: https://www.php.net/unsub.php >>> >>> >> Is there actually a bug that this functionality can/could prevent? I >> get that Maybe and Result types should be closed, but what are the >> risk of software defects if someone abuses that fact (locally)? > > I don't know if you replied to the right mail, I should have specified I > was talking about using an attribute versus adding a new keyword to the > language. Sorry, I was replying to the thread in general, not your reply specifically. ^^ Maybe I should have replied to the top mail instead, sorry. Olle