Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125376 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 25E311A00BD for ; Sun, 1 Sep 2024 16:46:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1725209297; bh=nLrp2WGw9Zcm8OtGKlJkU9I26pjiOIpCFv3F+BB5MJI=; h=Date:From:To:In-Reply-To:References:Subject:From; b=Pha09WajzhXvX5H7TQun/Hm2YGr+miAUm6yi1KQOGvm1UvIRUXQC5Dv/qDt8GC5bc 0hn9GmsrLoB06DV132BVQGLjA8CGIqDMDx+wlyNdi0evFtcoNFsW3bdaE/Kfmye6lf slmiEsRbz1GPSHEwfGskh7NS35CMNDvBnIcztonOdPQe7/NwilQKww9UAwiVB0HfxX Z69B1xpU7S8xqatA1EnjgX/65i3y0QqOYg5Et5fYbtZzskfMl5xJWDyk1dZrPEW56L DUxcvvLk7VRCwiUGR7fReFWIAp+PbwmT/jIM0BVIvuIPUOblCh5WkHE1BqXvMaDZmQ TnBBcGV2hXgBg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D3C80180082 for ; Sun, 1 Sep 2024 16:48:15 +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 fout2-smtp.messagingengine.com (fout2-smtp.messagingengine.com [103.168.172.145]) (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, 1 Sep 2024 16:48:15 +0000 (UTC) Received: from phl-compute-03.internal (phl-compute-03.nyi.internal [10.202.2.43]) by mailfout.nyi.internal (Postfix) with ESMTP id 498381380196 for ; Sun, 1 Sep 2024 12:46:18 -0400 (EDT) Received: from phl-imap-09 ([10.202.2.99]) by phl-compute-03.internal (MEProxy); Sun, 01 Sep 2024 12:46:18 -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=fm2; t=1725209178; x=1725295578; bh=nLrp2WGw9Z cm8OtGKlJkU9I26pjiOIpCFv3F+BB5MJI=; b=jm9xSGJTdV0la1v3RzGFYdErkt taK3jPYrmbMKhs731KncUa9eNhvZD+Okx3HHGcRaLida7zU3v7W3UHd7accvVQ6d SLosLBzVb5YUhsrtVVSDtKuNcFANclQt4PRW4lT04WwP10Koue9zBar3/S5ATnnj ovOzwc8FNqaiP+m7o0XVMAFIJqLrhoCv4y8DxU707zYjMKxyMnm9Y5M6BCxvrUPO +Yp1Cy4FQXpcRW6L6UP+zdrNgNcE1KSc8V44Cby6pmnJzBHVsaIGid9Cvi2fvjmg fSgkGUbNpxqfImQ2j/4FSyvGrhj1mOt+7LE/8ybpuX0yLVtUGA/hg/NWfYPw== 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= fm1; t=1725209178; x=1725295578; bh=nLrp2WGw9Zcm8OtGKlJkU9I26pji OIpCFv3F+BB5MJI=; b=e59/nljti94lUyz++wL9pCBqN8ewpgEwuUfxc7ihvqOc 65g6jrUVk4Fw8j++D3J/IsPPYOB1n3lGyhoxauTmdZTDVeSus5kIKR1vVCNRRQyx zOA86I9D50YW6vLJXNBjuFGDEOKMgME/lccnsCT9sPJbLCWIAT7AwzdaeDbCOu+G wXmcJRsJF0pha/sdYgGwCGrBzmKUwqmptNAmFirWXwruNNCpPOI+6N/I5lVMNH7c mmO7yC0r/uqhcrTJtoBByQO2r6klJXlsJYpcimi9qdvrcSPxt2l5pTlndjP6nJ1c AfP2lhKSVhkwNebVjBRACm1GfjG31y8yXyROI899UA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrudegjedguddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefoggffhf fvkfgjfhfutgesrgdtreerredtjeenucfhrhhomhepfdftohgsucfnrghnuggvrhhsfdcu oehrohgssegsohhtthhlvggurdgtohguvghsqeenucggtffrrghtthgvrhhnpeelkeehtd fgfefhleeilefggeeihfekvdelfeejtdfflefhheehfffgudetuddutdenucffohhmrghi nhepphhhphdrnhgvthenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehrohgssegsohhtthhlvggurdgtohguvghspdhnsggprhgtphhtthhopedu pdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehinhhtvghrnhgrlhhssehlihhsth hsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id CA5AE780067; Sun, 1 Sep 2024 12:46:17 -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: Sun, 01 Sep 2024 18:45:57 +0200 To: internals@lists.php.net Message-ID: In-Reply-To: References: <0c8ed5d6-5507-4c41-8d7f-05d14ba8aa4c@scriptfusion.com> Subject: Re: [PHP-DEV] Re: [RFC] Default expression Content-Type: multipart/alternative; boundary=6df47ec90fd249429f8b8eccdb57534b From: rob@bottled.codes ("Rob Landers") --6df47ec90fd249429f8b8eccdb57534b Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sun, Sep 1, 2024, at 14:39, Rowan Tommins [IMSoP] wrote: > On 29/08/2024 22:52, Bilge wrote: > > On 24/08/2024 17:49, Bilge wrote: > >> > >> New RFC just dropped: https://wiki.php.net/rfc/default_expression. = I=20 > >> think some of you might enjoy this one. Hit me with any feedback. > >> > > Now the dust has settled, I've updated the RFC to version 1.1. The=20 > > premise of the RFC is unchanged, but the proposal has been expanded=20 > > and a discussion section added to summarise the ~100 message thread = to=20 > > capture the major concerns raised in a condensed format. I hope I've=20 > > done a good job of fairly and accurately representing your concerns,=20 > > but if not please correct me. >=20 >=20 > As promised, I have written up a full explanation of the type safety=20 > issues here: https://wiki.php.net/rfc/default_expression/type_safety >=20 > I have tried to write this as a neutral description of the problem and=20 > the possible approaches we could take, to be inserted directly into th= e=20 > current RFC, rather than as a counter-opinion or a narrative of who sa= id=20 > what. >=20 > I have included the 4 options which I believe are the only ones we hav= e;=20 > it is then a matter of opinion which we think is best. For the record,=20 > my opinion remains that option 3 (limit to conditional expressions) is=20 > preferable, but I have assumed the RFC will continue to advocate for=20 > option 1 (allow any expression and assume problems will be rare). >=20 > I hope I have explained it clearly enough this time to overcome the=20 > previous misunderstandings of where the issue lies. >=20 > Regards, >=20 > --=20 > Rowan Tommins > [IMSoP] >=20 Thank you Rowan, I wasn't following the discussion closely and didn't realize this was th= e issue. Thank you for taking the time to describe it. For option 1:=20 Is manually copying the default also not type-safe? Is php a type-safe l= anguage? I think a lot of the arguments I saw suggested that people don'= t review libraries and their implementations when upgrading or installin= g them. This is just a shorthand for manually copy-pasting the default f= rom other code, and this argument really only makes sense to me if there= are no reviews before upgrading/using a library. For option 3: That being said, this is obviously playing with fire, and there will be = people who (ab)use this and get burned; especially if they don't do due-= diligence before using libraries. Thus a restriction may make a lot of s= ense; at least keeping it to the most obvious use cases should prevent t= he worst case scenarios imagined in this thread. Realistically, I think we should only consider option (1) or (3). Option= (3) -- if it can be done -- is the more conservative approach, and we c= an observe how it is used. We can always relax the feature in the future= , based on feedback. =E2=80=94 Rob --6df47ec90fd249429f8b8eccdb57534b Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Sun, Sep 1, = 2024, at 14:39, Rowan Tommins [IMSoP] wrote:
On 29/08/2024 22:52, Bilge wrote:
> On 24/08/2024 17:49, Bilge wrote:
>>
>> New RFC just dropped: https://wiki.php.net/rfc/default_expres= sion. I 
>> think some of you might enjoy t= his one. Hit me with any feedback.
>>
= > Now the dust has settled, I've updated the RFC to version 1.1. The&= nbsp;
> premise of the RFC is unchanged, but the propos= al has been expanded 
> and a discussion section a= dded to summarise the ~100 message thread to 
> ca= pture the major concerns raised in a condensed format. I hope I've =
> done a good job of fairly and accurately representin= g your concerns, 
> but if not please correct me.<= br>


As promised, I have written = up a full explanation of the type safety 
=

I have tried to write this as a neutral description = of the problem and 
the possible approaches we could = take, to be inserted directly into the 
current RFC, = rather than as a counter-opinion or a narrative of who said 
what.

I have included the 4 options= which I believe are the only ones we have; 
it is th= en a matter of opinion which we think is best. For the record, 
=
my opinion remains that option 3 (limit to conditional expres= sions) is 
preferable, but I have assumed the RFC wil= l continue to advocate for 
option 1 (allow any expre= ssion and assume problems will be rare).

I = hope I have explained it clearly enough this time to overcome the <= br>
previous misunderstandings of where the issue lies.

Regards,

-- 
Rowan Tommins
[IMSoP]

=

Thank you Rowan,

I wasn't following the discussion closely and didn't realize this= was the issue. Thank you for taking the time to describe it.
<= div>
For option 1:

Is manual= ly copying the default also not type-safe? Is php a type-safe language? = I think a lot of the arguments I saw suggested that people don't review = libraries and their implementations when upgrading or installing them. T= his is just a shorthand for manually copy-pasting the default from other= code, and this argument really only makes sense to me if there are no r= eviews before upgrading/using a library.

Fo= r option 3:

That being said, this is obviou= sly playing with fire, and there will be people who (ab)use this and get= burned; especially if they don't do due-diligence before using librarie= s. Thus a restriction may make a lot of sense; at least keeping it to th= e most obvious use cases should prevent the worst case scenarios imagine= d in this thread.

Realistically, I think we= should only consider option (1) or (3). Option (3) -- if it can be done= -- is the more conservative approach, and we can observe how it is used= . We can always relax the feature in the future, based on feedback.
<= /div>

=E2=80=94 Rob
--6df47ec90fd249429f8b8eccdb57534b--