Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120395 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 36548 invoked from network); 23 May 2023 23:32:38 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 May 2023 23:32:38 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4C5681804AA for ; Tue, 23 May 2023 16:32:34 -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,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 23 May 2023 16:32:33 -0700 (PDT) Received: by mail-oi1-f182.google.com with SMTP id 5614622812f47-38ede2e0e69so271861b6e.2 for ; Tue, 23 May 2023 16:32:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684884753; x=1687476753; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=mLp3nc1gPY7+55XLHwA0V53VnO9+nwxrsxuOg3ascz8=; b=rEmn2+itiBl6SqGoHJaUVtMDRbTXxGGiinBQYWfRo/atWqDD/44XUlyOZXYdwmPtGq 5N4NzhK5qE5RvXyzPvBTThWDCF9PDn6X8FgCQ/3UfdNuDDq1V5JOFZHAcYnDRfeL7cwd Orf6c7OgCoCQbdVZ5MIg1W5oeoi/i17b+nvzSL41P9/fZ1CMTY5qRq4tGMuAOPGlLD7Y v7m4ezwwvyTv2LV0BmOBntAmI+o6MHELUXMl2HQ81z0Y15FCN6gUVIMFsbtdeaeOpDsO vncAvfgOHJreA8DqhpI5PN07KVJw6lqWFj6y/YnjEZJCrpO3wFVxKpX1Bb+rDPBjTxXa h5NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684884753; x=1687476753; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mLp3nc1gPY7+55XLHwA0V53VnO9+nwxrsxuOg3ascz8=; b=GR80kSXzbWn4cGp2hMhiVryNZFHesflN3mS2N3TC5ziimw4tEXLmgFBpnefCA642UG i3HciL86H4FRAcMPesV0c71dJicroBCiotv2/gaCIfSGn6TcKYfJbDW0yU0W7MmUOh+g aSIH3CArvKX9tcEFCy/HE91a6OhVRGfLBKPxsxkHbTPhlF9hYTcMEUmDGo+PKnue3I+d 6KUkCPu+ijGHOP73YbjSQkDZW/MwCG2P31LwRCDLYGPmqDR8NGIUowolaAxouUXzZG31 bvRUQVBvkg+mmiqg+OTthknMP0MfCp0IwrtWU3Rg35npCtPT6o8M/vGDDTmsvn3nFJz3 baKg== X-Gm-Message-State: AC+VfDxKnjRSqsISrEo8UdlCltmxF3lQwTJpj9ZXeqbydBci0jL5hhPF RNGf59AQGCQ+l+YHKo2taaMI0h4SX671rDH4ZTO97C0iDQs= X-Google-Smtp-Source: ACHHUZ7bp4Pr+xDyDhHWCa1CR2uGBCzWIcvsoAn/p1Qqhij4TivfOdb9m4YE5riiRxqpIjA4v0+WEXlGh/LnK3FvX6I= X-Received: by 2002:a54:4085:0:b0:395:ec64:b085 with SMTP id i5-20020a544085000000b00395ec64b085mr7819994oii.20.1684884752637; Tue, 23 May 2023 16:32:32 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 24 May 2023 00:32:20 +0100 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="0000000000002b261c05fc64cdcc" Subject: Re: [PHP-DEV] RFC [Discussion]: Marking overridden methods (#[\Override]) From: davidgebler@gmail.com (David Gebler) --0000000000002b261c05fc64cdcc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, May 23, 2023 at 9:27=E2=80=AFPM Tim D=C3=BCsterhus wrote: > Just to make sure there is no misunderstanding I'd like to clarify that > the proposed check of this RFC is not a runtime error. It's a compile > time error, just like the check for incompatible method signatures > during inheritance. In fact it shares a non-trivial amount of the > existing logic of that check, because it's so similar. > > My understanding is that once the class is successfully sitting in > Opcache there will not be any further overhead. > I figured as much, I say runtime just to differentiate from compiled languages with a similar feature. Although OPcache is ubiquitous in production environments now, it's not obligated and the cache only lasts as long as the SAPI process. It's not overhead I think is the issue, anyway - at least not off adding "one more thing" at this stage, it's more the precedent of is there a sufficient benefit to adding this and potentially more features like it at the language-level. Merely delineating intent isn't something I feel warrants a change in the language, particularly when you'd need SAs and IDEs to implement it anyway for users to not be caught out with a fatal error at runtime (/compile time). Don't get me wrong; *delineating intent is a good thing*. I entirely get where you're coming from, however I'd refer back to my earlier comment: any attributes added in the engine should provide a tangible benefit which *can't be achieved in userland*. > I'll put the email back on unread and hope to > be able to give a more expanded and nuanced reply later. > Do this if you feel it's beneficial to the wider audience of internals to better understand the motivation and justification for your proposal, but ultimately it's not me you need to persuade so certainly don't worry about getting into further nuances on my account. I don't have any more feedback or thoughts for you until/unless the RFC changes, so I'll finish by saying for me, I'd either back Marco's suggestion of try it as a plugin for PHPStan first, or expand your proposal more along the lines of what Sara's suggested. Thanks. -Dave --0000000000002b261c05fc64cdcc--