Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109816 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 77706 invoked from network); 23 Apr 2020 17:26:33 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Apr 2020 17:26:33 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6A1BA18054A for ; Thu, 23 Apr 2020 08:58:31 -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.7 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS11403 66.111.4.0/24 X-Spam-Virus: No X-Envelope-From: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (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 ; Thu, 23 Apr 2020 08:58:30 -0700 (PDT) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id EDA055C0267 for ; Thu, 23 Apr 2020 11:58:29 -0400 (EDT) Received: from imap7 ([10.202.2.57]) by compute7.internal (MEProxy); Thu, 23 Apr 2020 11:58:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=8z3EODC8n369rb1kgZWj4/KxiRpehT+z5AnVuN5V/ 4I=; b=O3fJ7r9ePIcbp6JZKhhdmfLOJ2rxxdm1zGjkx0Vg/dELsYwl5l2SzYXDj AnNa066DoU408tp6h5cg9DLzpADZUGybuidTwz2h5RhGQkxZ0rFQuQRdP1d+IwF8 PnSCuZ1lAJ+pvvZnGjFql3zSpSuWPsp7rqAYxRPv63PMLLqT2EPCqc5oG3Q2kIcd tXHtgNfACsQeh1RTbX/cbCOtM1C2amucFuLCIVwXGIg3qdKRStOdL179jnEgPTQ0 S6zTKyZpxoJHGd9Q9/crG6BUiak3kDHIeJzlaHB4DJ4jAfhskeFVwn9YgfRMG74N Aqfh3lvtMPB/AGtIofJPE1f4cuw3g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrgeelgdejhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtgfesthhqredtreerjeenucfhrhhomhepfdfnrghr rhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hmqeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehl rghrrhihsehgrghrfhhivghlughtvggthhdrtghomh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id A7E74180091; Thu, 23 Apr 2020 11:58:29 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.3.0-dev0-351-g9981f4f-fmstable-20200421v1 Mime-Version: 1.0 Message-ID: <5766b2bc-bd82-4217-9547-6d8234258d1c@www.fastmail.com> In-Reply-To: References: <4c1cd016-1e41-4ebc-afc4-d8d3cd1c319b@www.fastmail.com> <31441489-11c6-4d99-9c53-6ac0e877f268@www.fastmail.com> <73b33704-ded2-4cbc-93bd-17e8874177f2@www.fastmail.com> Date: Thu, 23 Apr 2020 10:58:08 -0500 To: "php internals" Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Any interest in a list type? From: larry@garfieldtech.com ("Larry Garfield") On Thu, Apr 23, 2020, at 12:02 AM, Matthew Brown wrote: > > This is the *design* process for a language, and it's important... > Stepping back to reconsider how collections work generally, and how we= can > improve them in a graceful way that leads to a clean end-state, would = be > very valuable. >=20 > Though you have much more experience with internals than I do, I think= that > building a consensus around a bold new vision for PHP collections woul= d be > a near-Sisyphean task. Disclosure: I've been around the list for over a decade and talked a lot= , but the recent pipe RFC is my first core patch. I'm still one of the l= ittle people around here. :-) Though I have successfully engaged in Sis= yphean tasks before. (GoPHP5, Drupal 8, FIG, etc.) > Adding a list/vector type would be a much smaller, more easily definab= le > task =E2=80=93 it was one of the first new types that Hack added, and = by all > accounts they're pretty happy with that decision. I think we may be talking past each other. I don't mean "rewrite all th= e things." Just taking the time to think through "if we have a list typ= e, generators, and array/dicts, what should all of the ancillary bits ar= ound them be to make them as smooth as possible?" Viz, how do we NOT ha= ve array_map, list_map, and generator_map as 3 separate functions, becau= se that would be awful. Are list generators and array/dict generators d= ifferent things or the same thing, or...? Would comprehensions make sen= se as part of such a plan? (IMO yes.) But then, do comprehensions prod= uce lists or dicts or...? =20 That's the sort of knock-on effects that should be thought through befor= e we commit code, because in the long run it would reduce the amount of = code to commit (and the amount of WTF for users). --Larry Garfield