Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129181 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id 63ED51A00BC for ; Sun, 9 Nov 2025 20:28:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1762720105; bh=JKgUxyx5UQuZN5N84s5cWBTK3fgs3VU5Y7mPYqwwq4g=; h=Date:Subject:To:References:From:In-Reply-To:From; b=f5d0rteU/SnLWq67l/nrELV8LY45gGCYXNl5Ei9B2V3XG+insyHoamwGOwU4VIS+j hMQXnwLp/4JiD9gxvrVxOogMwPMro4zOF+BkUp6rNCfCad3UrV1I9JfyNoBcCLi/ge 5Uqi1W1wUBfwpI7rToUkvZczK11HoObWMF6R3eKKMBhgot0Jv5i73q8OKd7gKVkqeI VIwp5XLimTSdui18aW1e6g/ZwHM3c8hKUCvKJhOleQV1+m+CwzX4GcXgrZgOSBivN6 h9vVibxNVLQLw6bgURRHqhXZS9hcVnBwtkL5jKI0hhR4hd3Wc3xTJPkOi/AG+EnWOF GaV7WZmg6efNA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8F74A18020B for ; Sun, 9 Nov 2025 20:28:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 9 Nov 2025 20:28:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1762720096; bh=Tp0rqjXiGQYAt8nnYIdBKoE+kfcfcH9vSxFIwrO1rSs=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=D1RxHE6VbyfbjTmBdTfrdK9kVK7WsBVvt0EYeal0mseW7qOV5bJHVVL5z+v3swjfu zrvFpn1yxnpF8lDrPbgkiFZhOJKtM0HpVQF/Gm50ESGkn0w+3n3fsVwjD+SKFL688w Wpqdyj92yCBfXkP/4bRv4Rk/YNvsghvI5uUCVxbaLMEJLSIGaKytTDz9UN07SjvQto NuznKckR7eT8+Mn4/ZpRK9deScCI4HyTBwD+xwYWdgA1FzmP6v5Te9mXLfKb+SHp7k O2zwFfNvrW2e0nBkcJYKfxPrKidLzmfCtQ7lomAkvUInZU89ZITLptTrAV37nkFnw1 Ad85TEdwhxy2w== Message-ID: Date: Sun, 9 Nov 2025 21:28:15 +0100 Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Subject: Re: [PHP-DEV] RFC: Namespace-Scoped Visibility for Methods and Properties To: Larry Garfield , php internals References: <72f90052-fa19-415c-9f5a-ae75275fd030@rwec.co.uk> <2d9f8f1d-e568-4bb5-b30c-0a9e54a8f5fe@rwec.co.uk> <8978174c-04fc-451a-8bf5-cb7c54346318@app.fastmail.com> Content-Language: en-US In-Reply-To: <8978174c-04fc-451a-8bf5-cb7c54346318@app.fastmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 11/9/25 16:33, Larry Garfield wrote: > In particular, the syntax is a hard-no. It runs contrary to how the aviz syntax was defined, as others have already noted. > > If you don't want to use `internal(set)` to save `internal` for some other use, that's fine. Come up with a different keyword. :-) But () is the syntax model that aviz established, and tossing extra parens in there just confuses things for everyone. I agree with that. > If it really does need to be an entirely separate dimension of scoping, then I would argue it's too complex to capture in just keywords and Rowan's attribute proposal becomes even more compelling. I disagree that this should be an Attribute for the inverse of the reasons of why `#[\Override]` *is* an attribute: https://wiki.php.net/rfc/marking_overriden_methods#why_an_attribute_and_not_a_keyword Visibility is part of the public API and by making this an attribute, the code will seemingly appear to work in older PHP version that do not yet know about the attribute, but its behavior will differ. It would of course also be syntactically / visually inconsistent with any other visibility definition. Best regards Tim Düsterhus