Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114177 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 7132 invoked from network); 26 Apr 2021 07:31:39 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 Apr 2021 07:31:39 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 27B9A1804DF for ; Mon, 26 Apr 2021 00:35:38 -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-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (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:35:37 -0700 (PDT) Received: by mail-lj1-f181.google.com with SMTP id z23so16408805lji.4 for ; Mon, 26 Apr 2021 00:35:37 -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=W3arGBmC4z1V+X/F0Z+37JcWHdLoVe/y9UIlOYk2BpY=; b=ojmpSwJX+tR9M3zwsxSpMe933gFi24D510ErytGYDMPJvNDKS2X8xtYwBGIuofCr/l 76eYeV9PvXKatdU4MYuvBFilAnnYaCH3SkTj/58nMMymcAEQlO/CXFjbD+eKVQmgOuU9 7iNcE3TBlNmZAXLsg3+U2udqp+JlQLbFP2KxGt6jPoE5YQzpEsZxyXUtPisvefEYEnEk MrQdz8mFCb5zSz9s9PCkiYgv1r5g+Xk4QOxAXsjwaP8880FnDoIYxyxYoJILP7TKQDqT dlHvBmqawKwBOnBWRUiE4UFPHR93IgSdSpZf6N0wuhgsY9slt8QVtT2Wl7Nrg7Uu1zPc lRfg== 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=W3arGBmC4z1V+X/F0Z+37JcWHdLoVe/y9UIlOYk2BpY=; b=pl0Lp1n1IXyt1uSvusN6sKuISvPMrkPX+LxP+D55MPVWaJlQuaU0fYZeMAPuXoRZs5 dTmf9ZV9muC0DXoHJE5xHGZAtIvfVX69lMbqrVYjk+ChYAROxJyXTay813kNZrTJw3v0 VfaVCFVMStYyXkBl7o+OG4b0SQPlcBGRUDdSIIwNWiudp/jbVPTMIVNqUig1xKSx5LJv 7m5cuCcU8ioH3vUQ4ewpeAlD0WSfF31YMVfDjzFcv9xITxHQ5eU74nF7pV3AMzuhyQmt 5ha/zSeAb1cobSEGI3g/Dyc+D5FUOmOPnn/2tb9W7UeQLismxYeXmgJnNKCq76Zgbxo1 H58A== X-Gm-Message-State: AOAM530xFXBgSw1nA+q+hET90k1q7JXiNTP5T76cSDplRK3qMbfLnvUv DUWj2ikiGNoeVVyYik69ab31Fkn92qnKMMlAeXEU4tt+ X-Google-Smtp-Source: ABdhPJzcGrNlz0BeoOD0QtjGDLlmXpq+DonEhhjmuWKlaB3rnkM/MTpPHOoYCNYnbtZZ1tnlhC4tlzWPmr2JR/cr4sQ= X-Received: by 2002:a2e:b0cd:: with SMTP id g13mr12148477ljl.71.1619422534286; Mon, 26 Apr 2021 00:35:34 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab3:4e13:0:0:0:0:0 with HTTP; Mon, 26 Apr 2021 00:35:33 -0700 (PDT) In-Reply-To: <015f6acb-eece-93c4-fd0e-0b54acd7170e@processus.org> 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:35:33 +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: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 wrote: >> >>> 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 second >>> 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, honestl= y. >> 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 single > 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)? Olle