Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118419 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 80836 invoked from network); 11 Aug 2022 16:56:47 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Aug 2022 16:56:47 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 507DA180538 for ; Thu, 11 Aug 2022 11:58: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=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS29838 64.147.123.0/24 X-Spam-Virus: No X-Envelope-From: Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 11 Aug 2022 11:58:53 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 42138320091B for ; Thu, 11 Aug 2022 14:58:52 -0400 (EDT) Received: from imap50 ([10.202.2.100]) by compute1.internal (MEProxy); Thu, 11 Aug 2022 14:58:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to; s=fm1; t=1660244331; x=1660330731; bh=xm78mXdVaMRKm0niDw+bKYblu xjT9OwR+2Uojx1aUXg=; b=VFZMrX0uIqaarL0hijsF0xBW0JvteEs/kQd2vdprT SXqAH5Y1HPMOcEv6by1nZNFzd6BJTnPQqT3j/hWBLvjnp76saWqKK/BJkivvWnav 3h5RfZ76bemAqlQbA2VrqcFWWQXwskSQDZQH2L1uhiIE+WaElGEKLSAf2cOn51fO XC9mpt/EGox298KaD83xgxv4Ov1Tvreph0VGlP4nP9yASHRmgyqd6JbBBKHzFnvC ys563cgb7rdp7+J69wdvJiRntjpwA08lvuLhBz++UGrjty72O7qfYD5JNOQlX5db /VbrBdBMSB2cNnhTghGlrCbldeZctUcE+Hz8HwzX+dMiQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:date:feedback-id:feedback-id:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1660244331; x=1660330731; bh=x m78mXdVaMRKm0niDw+bKYbluxjT9OwR+2Uojx1aUXg=; b=xE+AvUkXJIHG8MMci o/p9d5zFqJogKVTnFYS/jxmInjQgw88ZfBjofEuaH/DqdkB2/GeAkvMspVuD0YfN bJlSOMEwwBNyp+ooHz4FAY+qnkTijvOEp59Tk2wu35kLof7vlihIKzK/Wb5tGowF q95DX/gRZB1Vv7BuqyDHZQ5gud5AzpRpZ3JCttJ0/IiOZzchAQi9NBBL4MDcg8gc oWiIZ6tMIDivdI9wqUlqPoz8mitq3/ptiFO1sBIXOeGgMoDAKZmV3RZiYsIgZGxS nmz4EfWI2Lw/f0N+f9xML/1FKLvzv0Ue01JQUPPlsy1szxUCQp0kHKd5YqPsYAyz 2jq2g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdeggedgudefvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtgfesthhqredtreerjeenucfhrhhomhepfdfn rghrrhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrd gtohhmqeenucggtffrrghtthgvrhhnpeffffffjeffudfggeevvdeitdetvdfgjefffeff jeelfeejteevheeghffhvdfgleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 7C7B81700082; Thu, 11 Aug 2022 14:58:51 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-811-gb808317eab-fm-20220801.001-gb808317e Mime-Version: 1.0 Message-ID: <06d0c009-2ea5-47cb-beb2-eb6f033d41c3@www.fastmail.com> In-Reply-To: <6717F20F-D27A-4BF7-8C59-71126B1D1F50@gmail.com> References: <62f48769.250a0220.37387.53b5SMTPIN_ADDED_MISSING@mx.google.com> <01D4987C-FD37-4BD2-A1AC-DD10F808F248@gmail.com> <69767A9B-B336-49AC-8932-C895DB3B373D@cschneid.com> <6717F20F-D27A-4BF7-8C59-71126B1D1F50@gmail.com> Date: Thu, 11 Aug 2022 13:58:30 -0500 To: "php internals" Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [Concept] Extension methods From: larry@garfieldtech.com ("Larry Garfield") On Thu, Aug 11, 2022, at 1:51 PM, Alex Wells wrote: > The pipe operator RFC has actually been mentioned before; the short=20 > takeway is: pipe operator works and has a benefit of using existing=20 > functions. The downside is that those are still functions, not methods= ,=20 > meaning you=E2=80=99ll still be left with `[your_type]_` prefixes for = all=20 > function names, unlike extension methods, where you can have multiple=20 > methods with the same name (for different types). This is incorrect, and has been since functions could be namespaced. Pl= ease stop repeating this, it is FUD. Also, "existing functions" is also not quite accurate. PIpe worked with= any callable; the Partial Function Application RFC was intended to make= turning arbitrary functions into callables, which could then be easily = piped, but you can also use arbitrary callables, including closures and = objects that implement __invoke(). array_map in its current form wouldn= 't be pipeable anyway as it requires multiple arguments, but higher orde= r functions that are pipe-friendly as trivial to write. (See previous m= essage for a link to many.) --Larry Garfield