Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126799 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 1A8341A00BC for ; Mon, 17 Mar 2025 07:53:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1742197868; bh=ymnOKWP+iB1lupJfTqiN6xcDWeQtQ75AyMN+LDIcflM=; h=Date:From:To:Subject:In-Reply-To:References:From; b=VKGwBN8nJnmVCo+JAlSyW+dBS6HWVR5b8sEwpf8Kqi6s+VMEnX2V2bzI6lEzNKDlx sQzEnbEv84QV9NEGBff7ghdKRl4l5nYPcVVUqxy21OVB+IdF/fnxQEI4x6z+JosCrF njpyLf4P5IGgwITj0u1xckSIhU4HpqnGg7ziaQavkb+pDUEr6z8R+FYfmLlEtl+RvE azN2DvMchu6s0LUNy3XNoHqxJezb17ppT0bTz6jZH8oIhUlEjC7jorAI0p6E03N10K QNHg2Rj1W7SpV1B8QeuV3yIQ2NGHULDjf82BWFdDZBnDZtRSQahWdyfOptFEpWBAOl diXdr6ZcbykWw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1DE5618006B for ; Mon, 17 Mar 2025 07:51:08 +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, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-a1-smtp.messagingengine.com (fhigh-a1-smtp.messagingengine.com [103.168.172.152]) (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 ; Mon, 17 Mar 2025 07:50:57 +0000 (UTC) Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfhigh.phl.internal (Postfix) with ESMTP id 63B3F11401B4 for ; Mon, 17 Mar 2025 03:53:29 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Mon, 17 Mar 2025 03:53:29 -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=fm1; t=1742198009; x=1742284409; bh=arPDb/0lYQae9tfMoY5PrS0XOVwqaHgR4wVkGq3s1Nw=; b= p5KWfSaWzh9nYuQjcWnEWk2mWOLo3MmGrSAeh35BIYbbMe2BhGx4KwdBvesywDTc 3IBj7tmGnGh7nsGr6OxcY6ZhOT2gBHTFUyEAFb2YafBsTRb94sRWXXpVyjx8ltsr iuUp+132UBYhErm+3BO1aqQB5EZPhaPIyxVNIPexZeUWc5ki5/CY3lXkPusPoj2/ iv7GkoSj9QmDgXkVTGyFjbPLPL+nOg0+PZ8q4KcNDj/CghNqOiIt7UPh0qeqnqai CPtu0agbMm5aSpRFisGvgYGzbsbj/rrwv9DFKx4FdvhxVITs4eIlA9+Z6lUtqZpA +52yTBjygDnJ6eWK0mP40g== 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=fm1; t=1742198009; x=1742284409; bh=a rPDb/0lYQae9tfMoY5PrS0XOVwqaHgR4wVkGq3s1Nw=; b=vSoKcYA45VO6+7mBR askkpY/MLHZFzkVMKqx8fwC6CJlup8OYAmVnlhDh41GurNQDMmq7dZNUFUxHF6lq zKUuAJxfn1kGY0ak+FOE4sCxu1+Wp1sUGXLF8TweTsd5Pn7oDanz/OBqupNKvRWr R12C/tPNcgdkOpYMItUQpfXvaniZXie/ZJZnBUx0E0+wn8OjDtnY93sCskd61G0x nNrHryrKnMPROuXIsksqSy9xjC55taLmkeXPYRhMcPFTzeLjyQ8OOfTvHbeaR8RL h/Sjo8fh6KyT0/0HCzNsu8zJriLz8Q6XQFQs1RmvCBW9sc/pCh2UxFk96I+wozH/ 0Ofog== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddufeekleeiucetufdoteggodetrf 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 ; Mon, 17 Mar 2025 03:53:28 -0400 (EDT) Date: Mon, 17 Mar 2025 07:53:27 +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: <8bbb484b-96a3-4a3e-881e-2c47d7f433b9@app.fastmail.com> References: <4abd7008-ae33-46fe-8bbd-7c99f7c48158@app.fastmail.com> <0F1E4400-5E26-4E39-88B9-ABD7ABBAEBC4@rwec.co.uk> <8bbb484b-96a3-4a3e-881e-2c47d7f433b9@app.fastmail.com> Message-ID: <7C4630DC-3478-4FDD-88C6-D2B27595F02A@rwec.co.uk> 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 17 March 2025 07:11:23 GMT, Rob Landers wrote: > >namespace Outer; > >class Inner {} > >And > >class Outer { > class Inner {} >} > >These would both resolve to the same class name for Outer\Inner=2E That's the frame challenge: is that actually a good thing, because it make= s the description of nested types a lot simpler? > Which one it resolves to would depend on how you implement autoloading That's just the same as having the same class defined in two files on disk= - PHP doesn't know which will be used until an autoloader runs=2E From=20what I understand of the proposal, the calling code won't know anythi= ng different based on it being "nested" or "namespaced", it will just see a= class with a long name with some punctuation in=2E > Then there becomes the question of either letting user-land implement th= e autoloading changes, or have php walk =E2=80=9Cup=E2=80=9D the namespace = chain in the hopes it implements an inner class=2E I think it should be left to the implementation - PHP makes no assumption = about one class per file anyway, so am implementation could already do this= with a namespace{} block=2E=20 It is a reasonable point that the convention for when an autoloader should= walk up, and how far, would need to be defined=2E Then again, I'm increasi= ngly convinced autoloading is a dead-end for the language, and hope to see = more enhancements to preloading and a module system instead=2E > So, maybe, it could be useful to use \ but in the long run, I=E2=80=99m = not sure it makes sense=2E I rather think the other way round: in the short term, a new separator wou= ld save users a bit of pain with autoloading, but in the long run it will l= ook like a weird anomaly that no other language needs=2E Rowan Tommins [IMSoP]