Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126942 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 qa.php.net (Postfix) with ESMTPS id B4C8F1A00BC for ; Tue, 25 Mar 2025 21:05:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1742936605; bh=Xfwqfxx6/mLEO1aKXsZP+m6+fnnlu08lduEACI3Cln0=; h=Date:From:To:Subject:In-Reply-To:References:From; b=Zt2xdP7qzAaY60u/Wfg9okKesbEalIXGndlr8+lWZac7n72aZOuTRMcwXF+ZhLxK8 Q8eosEo6BK3bGCb975OFgphbc/PJRG41um+jSEaIM5nvDNv1iJqgmeS25wrgkQamSl DjeFoWjeuSyiNQzCDGMb7j/gAgNJrqLk3m6vWpKqGX7vGTtg19zQaOV6FsfPKNq5Gn To7yVCF8/T1c3Z2BNisKIO5D6QpDVUA+X8RsMKGEJAy44YpvTdpBborzcs9k54cE2s NKj50TUK08tHQidWjomzIWQt/IzMH8Ns9o2BAeb1mjV8/F21TtoCai9lguMuZ5AwDR A24npXiFxBazQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 740AF1806ED for ; Tue, 25 Mar 2025 21:03:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-b5-smtp.messagingengine.com (fhigh-b5-smtp.messagingengine.com [202.12.124.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 25 Mar 2025 21:03:24 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id ED3BA2540175 for ; Tue, 25 Mar 2025 17:05:52 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Tue, 25 Mar 2025 17:05:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rwec.co.uk; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1742936752; x=1743023152; bh=Xfwqfxx6/mLEO1aKXsZP+m6+fnnlu08lduEACI3Cln0=; b= IEfohH9LSBoKBFax7Nx7P2a7Ron/nX2h0qcKF2RYLpLSIRgOokidi7gMHAwUsQcj GUoM825o6Bk4OKISOLsmemBTrWCe8PHTh+UxwR88V2X9Bid7ks9fUQ21Ovpxp575 lb5YSSsfkEndD/uNKduup/BLnpI9v/IHYvoS0wjc2Ge/AD7mMZIpoMUctuzMAHFz uT3s1jNyC0Lutqp5q+a4zIu+3IyDjsKHLVaTD9P2UNO4LXB5DlU3c6ZuV71zjxof zDrDJ5OoX+FxW+sxW1diAHWOvLIFmmVuu8iUn2qAV+3XCXD/5b7D35N1tkieW3j7 zKyM+u6+cFtRAn9RCu9DZw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1742936752; x=1743023152; bh=X fwqfxx6/mLEO1aKXsZP+m6+fnnlu08lduEACI3Cln0=; b=kjEkwSzvY0n1CKlq7 MJi0xpX6St2M6mWhHtTglE8OnLggfvFQIXooXsuwtzNUc9C1y6O7JmlJ5Zphqf3V XqunzNtntF0QSo++azsVDeiKfCU/tROkP/IX2IH2ixMAfZOjGWMwQvGr1wXuwleg D4fRi0uIRDLgw2s7rkeA/pso5imOMrbr0nEJLaedx22KYL61+1cM4gcKo5GNBJNO l/am/PCAZgajTYn8JmC7xRgE51xoPY+yHPhSAUpVOl8REFDRwy3qNMBIrRIxKr27 HsnDL9oUPqia+mYyXpCRvNKaAdsDRztW0yW+Rd7LWUOqSbdCkjEfZR6M1aEcJ0Kw CS2rw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduieefieekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpeffhf fvufgfjghfkfggtgfgsehtqhhmtddtreejnecuhfhrohhmpedftfhofigrnhcuvfhomhhm ihhnshculgfkoffuohfrngdfuceoihhmshhophdrphhhphesrhifvggtrdgtohdruhhkqe enucggtffrrghtthgvrhhnpeehleffteeigfevudetfedugedtudevledugeeugeelheei hfehgfdtkeevvefgleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehimhhsohhprdhphhhpsehrfigvtgdrtghordhukhdpnhgspghrtghpthht ohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepihhnthgvrhhnrghlsheslh hishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: id5114917:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 25 Mar 2025 17:05:52 -0400 (EDT) Date: Tue, 25 Mar 2025 21:05:49 +0000 To: internals@lists.php.net Subject: Re: [PHP-DEV] RFC: short and inner classes User-Agent: K-9 Mail for Android In-Reply-To: References: <782d76d9-711a-4cee-ae0e-fe0d69973f53@app.fastmail.com> <48dce917-d147-456b-9f03-c7e23411adff@app.fastmail.com> <8a16b81c-7dab-4523-a352-76ba0cb4e771@app.fastmail.com> <9c4ac301-dfb2-49da-90e5-37a2824fc4e3@app.fastmail.com> <5b1e6d70-a1c9-455c-93d3-6b22cf1fef11@app.fastmail.com> <52d84a5b-09d3-4e42-9620-a62fb239c21e@app.fastmail.com> <09a82882-f1ee-4bdb-8a27-e46144a711f1@app.fastmail.com> Message-ID: Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: imsop.php@rwec.co.uk ("Rowan Tommins [IMSoP]") On 25 March 2025 20:29:16 GMT, Rob Landers wrote: > Personally, I'd feel that file-private should be kept as simple as possi= ble and limit it to "top-level" things, but that doesn't necessarily have t= o be the case=2E If we did allow it on methods/properties, when mixing it w= ith regular visibility, what happens? `fileprivate public private(set)` =2E= =2E=2E means what exactly? If we didn't have "protected", would you ask the same about "protected pri= vate"? "fileprivate" would be just another access level, not something you'= d combine with existing ones=2E > maybe `fileprivate` on a property means `public` in the file, but `priva= te` outside the file=2E But then how would that intersect with inheritance? That was the point of my philosophical rambling about Swift: you don't hav= e to define new access levels in relation to old ones, or new features as e= xceptions to old definitions=2E You can just define the keywords you allow, and the access they provide=2E= That's true whether you're defining "private", "fileprivate", or "access_l= evel_42"=2E For instance, "fileprivate" could simply mean "accessible from any code de= fined in this file"=2E Since classes are fully declared in one file, that m= akes it a strict superset of the access currently meant by "private", and a= pplies equally well to a whole type, a method, or a property=2E I see no reason for inheritance to be involved at all=2E If we want an acc= ess level that means "accessible from any code in this file, or any subclas= s of the current type", we can make up a keyword for that as well - "filepr= otected", or "fileprivate_or_protected", or whatever=2E Rowan Tommins [IMSoP]