Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108493 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 83607 invoked from network); 11 Feb 2020 20:16:33 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Feb 2020 20:16:33 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6F55E180553 for ; Tue, 11 Feb 2020 10:30:30 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_05,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS29169 217.70.176.0/20 X-Spam-Virus: No X-Envelope-From: Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 11 Feb 2020 10:30:29 -0800 (PST) X-Originating-IP: 166.173.249.171 Received: from [172.20.10.3] (mobile-166-173-249-171.mycingular.net [166.173.249.171]) (Authenticated sender: pmjones@pmjones.io) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 45F981BF203; Tue, 11 Feb 2020 18:30:26 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) In-Reply-To: <50BD013E-CF72-414C-BBC0-A7A2E45CBDDB@pmjones.io> Date: Tue, 11 Feb 2020 12:30:25 -0600 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: References: <50BD013E-CF72-414C-BBC0-A7A2E45CBDDB@pmjones.io> To: Mark Randall X-Mailer: Apple Mail (2.3608.60.0.2.5) Subject: Re: [PHP-DEV] RFC: Server-Side Request and Response Objects (v2) From: pmjones@pmjones.io (Paul M . Jones) Hi Mark, > On Feb 10, 2020, at 11:02, Mark Randall wrote: >=20 > I suspect this is a similar sentinment to the previous version, but I = can personally see no major benefit to having this as a core extension. >=20 > I think the reality is that discussing it "on its own merits" is to = completely ignore the wider ecosystem that already performs these = functions, with more capabilities, and with potentially hundreds of = thousands of implementations already in place. >=20 > Does it add capabilities which cannot exist in userland or cannot = exist in a reasonably performant way? Doesn't seem so except for a = readonly property. >=20 > If not, leave it to userland. I completely understand that sentiment; I recognize that it is shared by = others on this list and elsewhere. But if you'll allow me, I'd like to = present a counterargument in relation to previous PHP extensions. When ext/pdo was added to core, there was already a "wider ecosystem = that already performs these functions, with more capabilities, and with = potentially hundreds of thousands of implementations already in place." = Some of those implementations at the time included (I'm working from = memory here) AdoDB, Metabase, MDB, PEAR_DB, and many more that I cannot = recall. PDO did not (to my knowledge) "add capabilities which cannot exist in = userland or cannot exist in a reasonably performant way". (I'll grant = that FETCH_INTO_OBJECT setting properties directly without using the = constructor was not possible in userland, but that's an exception that = tests the rule.) Indeed, PDO had a relatively reduced feature set in = comparison to some of those userland libraries, especially AdoDB. And yet, PDO has turned out to be of great benefit, because it brought = together features into core that (figuratively speaking) everybody = needed and was rewriting in userland over and over. PDO is the strongest example here, but depending on how you count, there = are 2-3 other extensions that also serve: ext/date, ext/phar, and = (reaching back to antiquity) ext/session. So, there is a long history of widely-needed userland functionality = being brought into core. I would say this RFC is a pretty tame example = of doing so; the proposal presented here is very similar to the way PHP = itself already does things, just wrapped in object properties and = methods, and is very similar to how things are being done across a wide = swath of userland. Now, it is possible that the objections you raise *should* have = prevented PDO (et al.) from going into core. If that is the case, and = (in hindsight) we think it was a mistake to allow them, then consistency = alone makes your objections valid here as well. However, if (in hindsight) it was *not* a mistake to allow those = extensions, then the raised objections are not especially strong = arguments against this RFC. That's not to say "because PDO was allowed = into core, this RFC must therefore be allowed into core" but to say = "those objections alone were not a barrier to PDO, so they alone should = not be a barrier to this RFC". I hope that's an understandable counterargument, even if you don't agree = with it. --=20 Paul M. Jones pmjones@pmjones.io http://paul-m-jones.com Modernizing Legacy Applications in PHP https://leanpub.com/mlaphp Solving the N+1 Problem in PHP https://leanpub.com/sn1php