Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117402 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 89597 invoked from network); 22 Mar 2022 22:55:12 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Mar 2022 22:55:12 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 22CC4180381 for ; Tue, 22 Mar 2022 17:21:48 -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.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS19151 66.111.4.0/24 X-Spam-Virus: No X-Envelope-From: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (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 ; Tue, 22 Mar 2022 17:21:47 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 503405C08CE for ; Tue, 22 Mar 2022 20:21:46 -0400 (EDT) Received: from imap43 ([10.202.2.93]) by compute5.internal (MEProxy); Tue, 22 Mar 2022 20:21:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date: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=fm3; bh=zw8QNl/thqrQwvZZJ UJNVCLU1quNlk995REmB4KFMA0=; b=AWbp+7hLVk46n4aTdfk1XahKPTp+bzu+h UfBonfJ52+mkjQqah/SJfTBhlvupKC9xmAOBHszP9peUitpxnsBPxOGAd05VqMrl 2cRrY7HzG/sFBbv4C2g7vnQr5ubLA5o/azrx6AYUyIA/1K01liRZTTuC/Xae2fYV FROXO6KJz0G+FKhygjX763aHJKfOtNYMVajI79zPggg3iPiHmNIy5mZTkDPxwMtV LrQ18SD1UbJXhBhgWdiVacCShea2ubSgocX35QKaR8QmhnZY/PW7QpN0FXtVlQOc fToPaVyZzlGk6FqRkNrzzBYF4kkP45jnLPnq/Sqh/4NpTOdMcwz4A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudegiedgudelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesthdtredtreertdenucfhrhhomhepfdfnrghr rhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hmqeenucggtffrrghtthgvrhhnpeeglefgkeduiedvvdetffeujefftdfhjeeiveehgfff keduveektddvledvvdfffeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 03DB5AC0E9C; Tue, 22 Mar 2022 20:21:46 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-4907-g25ce6f34a9-fm-20220311.001-g25ce6f34 Mime-Version: 1.0 Message-ID: In-Reply-To: References: <1289b56c-e766-4889-bbb2-06abb4e63a6d@www.fastmail.com> <3496914D-AF9A-48FD-B37C-DCA54CB32AFA@cschneid.com> Date: Tue, 22 Mar 2022 19:21:25 -0500 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] Discussion: String streams From: larry@garfieldtech.com ("Larry Garfield") On Tue, Mar 22, 2022, at 12:59 PM, Sara Golemon wrote: > On Tue, Mar 22, 2022 at 10:31 AM Christian Schneider > wrote: > >> Am 22.03.2022 um 16:14 schrieb Sara Golemon : >> > So while I said I wanted to avoid the firestorm suggesting userspace >> > overloading would bring, maybe that's the question to ask: >> > >> > Who's just a hard-nope on userspace operator overloading? If your >> reasons >> > go beyond foot-gun (and that is a valid reason), could you share what >> those >> > reasons are? >> >> >> An obvious one could be complexity. >> >> In the discussion about warning in conjunction with type juggling it was >> mentioned that this leads to increased complexity in the PHP core. While my >> knowledge of the engine is too superficial to really know I'd assume that >> generic operator overload could lead to quite some additional complexity >> and/or overhead. >> >> > I'm not terribly worried about complexity since operator overloading > *already* exists in the engine. The only thing we don't have is a little > bit of glue to map these out to method calls. > > This would be best served by actually writing up an implementation, which I > may do yet, but at the moment, I'm just gathering opinions. > > -Sara Are we talking about *arbitrary* user-space operator overloading? Because a very specific, non-arbitrary, well-designed operator overloading RFC was just rejected. I don't know that anything has changed that would result in a different result for an even-broader (more foot-gunny) RFC. Personally I'd settle for a bind operator, comparison operators, an some built-ins to use those for a new stream API bootstrap. That would already be huge, but the voters seem not favorable. :-( Side note: I was asked elsewhere if bind was like pipe, since they look alike. Yes, bind is simply a "fancy pipe", essentially, for some contextually-relevant definition of "fancy". We should still add the non-fancy pipe as well while we're at it, but that's a separate RFC. :-) --Larry Garfield