Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110078 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 67719 invoked from network); 8 May 2020 03:27:19 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 8 May 2020 03:27:19 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DF915180507 for ; Thu, 7 May 2020 19:02:53 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 7 May 2020 19:02:53 -0700 (PDT) Received: by mail-qv1-f48.google.com with SMTP id p13so41913qvt.12 for ; Thu, 07 May 2020 19:02:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :cc:to; bh=7mTHxovKEXRPZuJ94OmMe0L+aCDyYPJhT6IM452u2Fs=; b=MMwutzc6bhQIRDJeMUjtRPBWcvmPLnrv2PLHdyMmtAyNTQRatNhlbvG16+6n4dnj78 c5nXMG3ytDhU504VmWVrpmhNjM9BuJ22D7zhQJKH1aF0FgLgl/lbtCquFaJl0vD9XjwD VgxaMOpNoSbRrHnYSkp+DDkHiQPvJOzyv1feNPSZf/97kNXNz/k4aMbjLP+xx+N/9I7y d9jFoXjteDN6U3lGQa8nNyf8oDuT8pXRaegvZrf98gDFcHVo5oWGXHltvG3wSlb3p1FR T1USmibkmhte5HghhyOL1QdCLD6mdjWUiQMcEpAgIcjQdsIPOqUq4iKAMQ7mpsALzh3G ZfIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:cc:to; bh=7mTHxovKEXRPZuJ94OmMe0L+aCDyYPJhT6IM452u2Fs=; b=ErV/v/9KKDx+zkbOdBD1yvCpeSb3xr7r7TxaADqD5RZ/0k/pP2RSf9Ry5HwIB7aEpy hP+Mrgl+hxnjGBmuTDMkiIgh3kbhWtL6xb7AwNko7SLDMDNzIz9LZhB6hnVE6VlfDbsL axeo3KwjaxFUuzx8OaQsrSrnZS703nyzO7+ZCxceDGR23fBhZTgGRyhMzphbWw1/f178 JYvGDiI0daRW5HMPsBzGe1ejw/wTfaP5uN74rqGnrvP+dSIdoA+xynCrlE0J2WfIdVrQ 2kz7TNw7LwRlvj2ZSiI56s7gRtl/EmCebWy9uv1K5qTWsX2lXiuiftuilPV68VgUpY2D yT/w== X-Gm-Message-State: AGi0PuYuETzt3d8hexC8NdmmWQe/Uap8U9hEf98P0GiQLw3GAep3hZzI CHTb0qObiy08E7MwZAAlio2o8Q== X-Google-Smtp-Source: APiQypJc5fkgu9f21crP50VIS7i/bncOYS9/mYXRgp/44UrZpL7msP4HmqvoHUn5c6cCDCW1/rbiZg== X-Received: by 2002:a0c:ec8f:: with SMTP id u15mr518092qvo.102.1588903371706; Thu, 07 May 2020 19:02:51 -0700 (PDT) Received: from ?IPv6:2601:c0:c680:5cc0:4da2:5373:968a:2214? ([2601:c0:c680:5cc0:4da2:5373:968a:2214]) by smtp.gmail.com with ESMTPSA id u7sm149303qkc.1.2020.05.07.19.02.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 May 2020 19:02:51 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Message-ID: <05D65F68-662F-4AE4-8D84-25B1D4279420@newclarity.net> Date: Thu, 7 May 2020 22:02:50 -0400 Cc: Rowan Tommins , PHP internals , Ben Ramsey To: Dan Ackroyd X-Mailer: Apple Mail (2.3445.104.11) Subject: A Standard PHAR library included with PHP? From: mike@newclarity.net (Mike Schinkel) > On May 7, 2020, at 10:33 AM, Dan Ackroyd = wrote: >=20 > On Thu, 7 May 2020 at 10:13, Rowan Tommins = wrote: >>=20 >> Unless we're actively trying to shrink the functionality of PHP's = core, >=20 > I think we should. >=20 > There are things that were added to core rather than done in userland = because: >=20 > * distributing libraries in userland used to be a lot harder than it = is now. >=20 > * Some stuff needed to be in core to give adequate performance. As > userland PHP has had it's relative performance increased, and also > computers have gotten a little faster since the project began*, that > need has been greatly reduced. One of the primary reasons for many of us =E2=80=94 or at least me =E2=80=94= to want more things in core is not listed above, and that reason is: - Standardization As a userland developer I would highly prefer to have the 20% of the = functionality that most everyone needs 80% of the time be provided as = standard functionality by the language rather than delegating the = use-cases to userland resulting in a veritable Tower of Babble in the = userland making too many projects incompatible with each other. If we had more standardization we would have more shared knowledge = across the PHP community. That makes it easier to hire developers, to be = hired and to work on an open-source project as there would be less = duplicated code that people would have learned that each is used very = differently. It would reduce the maintenance burden on userland developers where a = few developers can implement the functionality that the major of = developers no longer have to implement. It would reduce dependencies required. Ironically I was just watching = Github Satellite talk yesterday where they went on and on about how hard = it is to manage and maintain dependencies. And when we use PHP CLI we would generally be able to depend on any = standardized functionality being there. > On May 7, 2020, at 11:28 AM, Ben Ramsey wrote: > In many ways, I agree. In other ways, I see things like = `array_column()` and `str_contains()`[1] as being obvious additions to = the core, since they=E2=80=99re implemented in userland so often.=20 Exactly. The more functionality that is standardized and "just there" = the better. HOWEVER, I do recognize and appreciate at least one of Dan's concerns, = if I interpreted correctly he wants to minimize the maintenance required = for PHP core. Maybe it we all put our heads together we can get both?=20= 1.) Minimize maintenance for PHP core, AND=20 2.) Standardize the most commonly-used requirements for functionality? ------------------ One potential option that comes to mind is a standard library of = PHP-written functionality bundled in a PHAR file that would be included = with future implementations of PHP and automatically included by PHP. =20= If we had such as standard PHAR then we could add "standardize" = functionality for all PHP developers and yet reduce the pressure on core = developers to implement and maintain said functionality in PHP C source = code. This would also open up the potential to contribute to PHP to all of = userland, adding many more potential contributors and providing a relief = valve for the C developers maintaining core so there would not be as = much pressure to include things in core and they could easily say "Not = in 'core; do the standard lib instead." Thoughts? -Mike P.S. One argument against a standard library might be that developers = would each want something different for the same use-case so we cannot = standardized. =20 While it is true developers would each have different opinions on what = we should add I think it is also true that =E2=80=94 while developers = will choose wildly different approaches in userland =E2=80=94 once = something is in a standard library most developers just accept it and = move on. And those that don't will still be free to write their own as = they have always been.=