Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124022 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 561FF1A009C for ; Sat, 29 Jun 2024 09:52:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719654819; bh=AY31XhBlTgC8cJcjtW4B+aFYfifr9rV0cYn9Q8g9S/U=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=AWdf/jbCtrzY0Q8o0le8KFkJGZPNCQszsycD0+nH8clQAqtM1WRCdKyf9/5vS8ZLn nWldJDa70SnwJeqPSV9PF1YlQOWbrcrcwL17tQcmdxgOjftQ3wpKWj2IVsanS4i5oH a2C7CW8DK8VQjFEtNirpt1Y98ymLVX9/xhYWfCRgeA9jZ+bQ6T6dxWM26qS6IP6CAu WtfMul64j8PIoEmQgrnqbOoYvOyKEHIwHNCtdWddNaT5DYBnoxRa/t7k8z5Klfqi3/ ffCoU1dwlEbPOmpheAWECo5pCuod47c+uNntYClWJxmTzxHCl8B7tvcMtubMuY0cKR I8FHFz1/rT/Ew== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3CFB71801E6 for ; Sat, 29 Jun 2024 09:53:37 +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=1.4 required=5.0 tests=BAYES_50,BODY_8BITS, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING, HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from fhigh7-smtp.messagingengine.com (fhigh7-smtp.messagingengine.com [103.168.172.158]) (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 ; Sat, 29 Jun 2024 09:53:32 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 8EE831140292; Sat, 29 Jun 2024 05:52:12 -0400 (EDT) Received: from imap49 ([10.202.2.99]) by compute1.internal (MEProxy); Sat, 29 Jun 2024 05:52:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc: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=1719654732; x= 1719741132; bh=AY31XhBlTgC8cJcjtW4B+aFYfifr9rV0cYn9Q8g9S/U=; b=Y UsDrF66XPGR8sRI09dVA+PhQE8B452kDSZ3AQOOqOPi/wvAnaeiLEOy9nA/6bQbH cTquxxy5Ffn9e5FTjb7YhoLNzhYX9pEWWmj+/WeFKncPoCjBHE49b9y/PM+99tpy 3+rXhJ8WaDhoIR4DVUSPbEgseZCxy4LrqczIb5buSDR32eo2VVEJhG+WxH8/aFia iKU3Vj0Wwoje2+YTo3Q4L8hm1KxUMVaoqzrfk6cnQ4dKrG0IbIMlEfPAYXteSXU0 CQlS33APmzzrh4LcHxXJglVk97HlDQbZmQAmzq9x18iZuy8tO3f2nRsp6sw+R4Xp /F/ZlW7fi3SvZWE5AGQ5w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=1719654732; x=1719741132; bh=AY31XhBlTgC8cJcjtW4B+aFYfifr 9rV0cYn9Q8g9S/U=; b=I5oa1ONQUJYR0BEE9fB+XcZMZjmYRIzYtvQ54ev1ljPm zEZUnLuIVu4A8uwTGlBiz4uSLwCh9sU3kk40yfAmwkinnpRoanvOk89uRwPjLh9A 2/7XbCXrhJ8vcJ3QgV6ZQe8ZGo9ARO7W+84aIVF8RFl29g48BlbYFcklJcXgn29C d4tL/Z2vZtGOLoFkkSb/XmrX44ejZ3ft3IacHa6dZsNu/CIISDxHGiY+x4R52H8y MQsRQOgoUicsnKwhNC1k87CAJn1RxI8hoBeOd84B8dOt1p4klPNU3Kq3b+yZGDbr se9t95ViaZW+iYE86DjZgSlZCQ96ePLMWn9xkQWxcA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrtdelgddvudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesrgdtreerreerjeenucfhrhhomhepfdftohgs ucfnrghnuggvrhhsfdcuoehrohgssegsohhtthhlvggurdgtohguvghsqeenucggtffrrg htthgvrhhnpedvheekteelveetfeevgeekgfffvdeuhfelveehvdetiefggedtfeejheet gffhueenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hrohgssegsohhtthhlvggurdgtohguvghs X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 453B215A0093; Sat, 29 Jun 2024 05:52:12 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-538-g1508afaa2-fm-20240616.001-g1508afaa Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Message-ID: <7c9efb85-766a-4215-ae71-138abbab0c8a@app.fastmail.com> In-Reply-To: <73D85D81-D3F2-449E-8991-4DEA194552EB@newclarity.net> References: <0acedb8e-34be-4348-907b-4075cf7641fd@app.fastmail.com> <9c20b078-f82a-47fe-af23-2f3cdd233079@app.fastmail.com> <920f33e5-0a2e-436c-86e8-e4bbd699e47b@app.fastmail.com> <73D85D81-D3F2-449E-8991-4DEA194552EB@newclarity.net> Date: Sat, 29 Jun 2024 11:51:51 +0200 To: "Mike Schinkel" Cc: internals@lists.php.net Subject: Re: [PHP-DEV] [Initial Feedback] PHP User Modules - An Adaptation of ES6 from JavaScript Content-Type: multipart/alternative; boundary=82a48d228670438d9e1cd6c6592c648b From: rob@bottled.codes ("Rob Landers") --82a48d228670438d9e1cd6c6592c648b Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sat, Jun 29, 2024, at 11:41, Mike Schinkel wrote: >> On Jun 28, 2024, at 7:45 AM, Rob Landers wrote: >>> Fast forward a bit - PHP 5.3, and the introduction of namespaces wer= e introduced to deal with the overloaded symbol tables. They are a bit a= hotwire as (if I'm not mistaken, it's been a couple years since I read = the discussion on it) they just quietly prepend the namespace string in = front of the name of all new symbols declared in the namespace for use e= lsewhere. As a result, PHP namespaces don't do some of the things we see= in the namespaces of other languages (looking at Java and C# here). For= example, privacy modifiers within a namespace aren't a thing. >>=20 >> This would be nice to have ... maybe. But namespace have been around,= what, 10-15 years? I think if someone wanted to "fix" it, it would have= been fixed by now. >> Or not. =20 >>=20 >> Never underestimate the power of inertia for maintaining a less than = ideal status-quo, especially when the decision to change has to be appro= ved by a 2/3rd vote of committee. =F0=9F=A4=B7=E2=80=8D=E2=99=82=EF=B8=8F >>=20 > -Mike I disagree that it is inertia, as there is quite a bit of flexibility an= d robustness in the current way things are. If you've ever had to get ac= cess to "internal" methods/fields in other languages, there are quite a = few hoops. - Java: as of 11.0 or maybe 8.0 -- it's been awhile since I've had to do= this, but you have to create a class in the target "namespace" and expo= se whatever you need. - C#: you have to use reflection to gain access to it. Right now, in PHP, you just "use it" and deal with the consequences of d= oing so. It's great when you need to work around a bug in a library and = very little friction. As a library author, I want *some* friction, but I= also don't want to force people to come to me and open a PR just for th= eir use-case (hence why I almost never make classes final as well). =E2=80=94 Rob --82a48d228670438d9e1cd6c6592c648b Content-Type: text/html;charset=utf-8 Content-Transfer-Encoding: quoted-printable

=
On Sat, Jun 29, 2024, at 11:41, Mike Schinkel wrote:
<= /div>
On Jun 28, 2024, at 7:45 AM, Rob Landers <rob@bottled.codes> wrote:
<= /div>
Fast forward a bit - PHP 5.3, and the introduction of na= mespaces were introduced to deal with the overloaded symbol tables. They= are a bit a hotwire as (if I'm not mistaken, it's been a couple years s= ince I read the discussion on it) they just quietly prepend the namespac= e string in front of the name of all new symbols declared in the namespa= ce for use elsewhere. As a result, PHP namespaces don't do some of the t= hings we see in the namespaces of other languages (looking at Java and C= # here). For example, privacy modifiers within a namespace aren't a thin= g.

This would be nice to have ... maybe. But namespace have be= en around, what, 10-15 years? I think if someone wanted to "fix" it, it = would have been fixed by now.
Or not.  
<= /div>

Never underestimate= the power of inertia for maintaining a less than ideal status-quo, espe= cially when the decision to change has to be approved by a 2/3rd vote of= committee. =F0=9F=A4=B7=E2=80=8D=E2=99=82=EF=B8=8F

-Mike

I disagree that it is inertia, as there is quite= a bit of flexibility and robustness in the current way things are. If y= ou've ever had to get access to "internal" methods/fields in other langu= ages, there are quite a few hoops.

- Java: = as of 11.0 or maybe 8.0 -- it's been awhile since I've had to do this, b= ut you have to create a class in the target "namespace" and expose whate= ver you need.
- C#: you have to use reflection to gain acc= ess to it.

Right now, in PHP, you just "use= it" and deal with the consequences of doing so. It's great when you nee= d to work around a bug in a library and very little friction. As a libra= ry author, I want some friction, but I also don't want to fo= rce people to come to me and open a PR just for their use-case (hence wh= y I almost never make classes final as well).

=E2=80=94 Rob
--82a48d228670438d9e1cd6c6592c648b--