Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125717 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 7374E1A00BD for ; Tue, 1 Oct 2024 20:57:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1727816365; bh=vGczCDMxE8TmTpdfeEtZzh0uqiEjTqGUTPfr9EOtFw4=; h=Date:From:To:In-Reply-To:References:Subject:From; b=KQH4JHMOcCiQB81rPBxpRpPKPBkcba4vNz5buYS6AbMKUTjs0S0c2Qe5XP4t+pVHr QvOfAdZlY++cCC6HPMPE8isutVqYSYcvsI8mj5z1OcXFIBPoOiiu0vIKLkeTAc28dv tMxJCC1H6WMK20rIypmXq8IYqGTMvaJpPUcoHhXMKbbogvs1Je/6gB6JN11Hv19G/u X+AFNSdc3cSjl8y7DbUvosI/LdPjOFWZ21S2mBn2YIuJlZW3+lR4GNlkyqWdirp3x1 gIiMrdn0AQL/0KxDTSDhe5DiqfWCv7obx51d5LaHZ5aLNJRL2Prtb6n8ALAjSUA4CY s5Y3gVCtHvp3Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 634C0180083 for ; Tue, 1 Oct 2024 20:59: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=-0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, 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 fout-a8-smtp.messagingengine.com (fout-a8-smtp.messagingengine.com [103.168.172.151]) (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 ; Tue, 1 Oct 2024 20:59:23 +0000 (UTC) Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id 5CCCD1380EC2 for ; Tue, 1 Oct 2024 16:57:10 -0400 (EDT) Received: from phl-imap-09 ([10.202.2.99]) by phl-compute-01.internal (MEProxy); Tue, 01 Oct 2024 16:57:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc: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=fm3; t=1727816230; x=1727902630; bh=vGczCDMxE8 TmTpdfeEtZzh0uqiEjTqGUTPfr9EOtFw4=; b=MUeQzvF17Feo1+0Mz7qG2cPXA5 veHEE2fJplo6Vi9qa7HQwkbDJtWYC5MbK/5XJK+l2dRvcnAheYdIh+xTTBCtfbhc pwr71jo0O0qOcWWIYA0398g9LaPQOrxQ9tUpH8K1DEDt6vUmm8xfJ2aLZvMV5k8F nRg9BTiTb/QEzc/xrP7diiSCzkrT1QLhGGZSYd5rhncPpJmmudT/h92WpxGtAZvt Jif7SCYi/kwSqePcwR31VG0GFBMknjVlM33Lm5WkdSw+UVjocHs8K8PRr4m1a6+9 VJjcSPlyUiSDnQT8ZVUpZw/rH29la0Q0V7f7YY1NlZe2/gcU39rc/ZAheTPA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1727816230; x=1727902630; bh=vGczCDMxE8TmTpdfeEtZzh0uqiEj TqGUTPfr9EOtFw4=; b=ARh44ecxBJ1/F9ZChjLLgg4xPDOBQI7Vq2SuxHJdA5SR PsplYQsWSMnYgXaXn6EEf364eTGipT8/u99qpG6ITigvYw7T5BO38W3y3D0aN79M XqFn4adYkGGuLSEWXd3LwPhFK6zYJiGMLhDe26Y/ImWXCvslHBJMXCNcY3/jX0vK Zsy6+Ud8nrnPFTJHh5Jqmi95opDeeqC4O3Rf1Qk7RXST9lFwXjcDyucLa7oarKv2 8yrm+M+vrfKb1MWnlOppkLKcBj/CzG1jfuX+9BZxmGvxcexpUgMicG+DbU5iL5Oj WlBgHdFPIfuQigJ453ImDLAdeuRYIzfZj5x+5f30qw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddujedgudehfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepofggff fhvffkjghfufgtsegrtderreertdejnecuhfhrohhmpedftfhosgcunfgrnhguvghrshdf uceorhhosgessghothhtlhgvugdrtghouggvsheqnecuggftrfgrthhtvghrnheptdeuje dttefhueelhfdtleeiudetlefftdduleehffegtdeihefhleeijefgveegnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprhhosgessghothhtlh gvugdrtghouggvshdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhr tghpthhtohepihhnthgvrhhnrghlsheslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 114D6780068; Tue, 1 Oct 2024 16:57:09 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Tue, 01 Oct 2024 22:56:49 +0200 To: internals@lists.php.net Message-ID: In-Reply-To: <680c10a5523288e4b1df2760e6e03da61a1ac6c5.camel@ageofdream.com> References: <2VnM6xycBpzqzDnAZKWS4zxCSUjvoKywJRiBzTcGhS8axaFS7QwbGNQtjkovo1jQi1XLiEGGTi3KfQfWoxUT527U_-6IGO3092BZdW436q0=@gpb.moe> <3ab9db77462c5f49c7c4a977098ba4677deb363f.camel@ageofdream.com> <680c10a5523288e4b1df2760e6e03da61a1ac6c5.camel@ageofdream.com> Subject: Re: [PHP-DEV] [RFC] Change Directory class to behave like an opaque object Content-Type: multipart/alternative; boundary=1b0ca7bd59b84612acd0a4adce2f3c1a From: rob@bottled.codes ("Rob Landers") --1b0ca7bd59b84612acd0a4adce2f3c1a Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, Oct 1, 2024, at 22:21, Nick Lockheart wrote: > On Tue, 2024-10-01 at 16:36 +0000, Gina P. Banyard wrote: > > On Wednesday, 25 September 2024 at 10:12, Nick Lockheart > > wrote: > >=20 > > > On Sat, 2024-09-14 at 15:33 +0000, Gina P. Banyard wrote: > > > I don't suppose we could call the Directory class something else, > > > like > > > "SPLDirectory"? > > >=20 > > > You can't make a Directory with `new` (or at least you aren't > > > supposed > > > to be able to), so any existing code would already get a Directory > > > object with `dir()` not `new Directory()`. There would be no BC > > > break > > > with a rename. > >=20 > > This is factually incorrect. > > This would be a large BC break, moreover PHP "owns" the global > > namespace. > >=20 >=20 > Is every single word really a reserved word in the global namespace? >=20 >=20 > > Otherwise, if you are in the global namespace and try to create a > > class which is called Directory this would result in an Error being > > thrown. > >=20 >=20 > Actually, it will not throw an error because classes are auto loaded. >=20 > The auto loader will not run because Directory is already registered. > It will instantiate a built-in Directory object.=20 >=20 > An error would only be thrown if the file with the other Directory > class is manually included, which most people do not do anymore for > class definitions. >=20 Hey Nick, Is this actually an issue though? \Directory would be a weird thing to a= utoload. Most people tend to autoload specific namespaces. I think it wo= uld be weird to autoload into the global namespace. Maybe I am wrong, and that is why I ask. =E2=80=94 Rob --1b0ca7bd59b84612acd0a4adce2f3c1a Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Tue, Oct 1, = 2024, at 22:21, Nick Lockheart wrote:
On Tue, 2024-10-01 at 16:36 +0000, Gina P. Ba= nyard wrote:
> On Wednesday, 25 September 2024 at 10:12= , Nick Lockheart

=
> > On Sat, 2024-09-14 at 15:33 +0000, Gina P. Banyard = wrote:
> > I don't suppose we could call the Directo= ry class something else,
> > like
>= > "SPLDirectory"?
> > 
> &= gt; You can't make a Directory with `new` (or at least you aren't
> > supposed
> > to be able to), so an= y existing code would already get a Directory
> > ob= ject with `dir()` not `new Directory()`. There would be no BC
<= div>> > break
> > with a rename.

> This is factually incorrect.
> This would be a large BC break, moreover PHP "owns" the global
> namespace.


<= /div>
Is every single word really a reserved word in the global name= space?


> Otherwise, if yo= u are in the global namespace and try to create a
> cla= ss which is called Directory this would result in an Error being
> thrown.


Actually, it will not throw an error because classes are auto loaded.<= br>

The auto loader will not run because Direct= ory is already registered.
It will instantiate a built-in = Directory object. 

An error would only= be thrown if the file with the other Directory
class is m= anually included, which most people do not do anymore for
= class definitions.


<= div>Hey Nick,

Is this actually an issue tho= ugh? \Directory would be a weird thing to autoload. Most people tend to = autoload specific namespaces. I think it would be weird to autoload into= the global namespace.

Maybe I am wrong, an= d that is why I ask.

=E2=80= =94 Rob
--1b0ca7bd59b84612acd0a4adce2f3c1a--