Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117400 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 70706 invoked from network); 22 Mar 2022 16:33:14 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Mar 2022 16:33:14 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3FE34180507 for ; Tue, 22 Mar 2022 10:59:45 -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=1.3 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_SOFTFAIL, T_SCC_BODY_TEXT_LINE 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-ot1-f47.google.com (mail-ot1-f47.google.com [209.85.210.47]) (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 10:59:44 -0700 (PDT) Received: by mail-ot1-f47.google.com with SMTP id i11-20020a9d4a8b000000b005cda3b9754aso932159otf.12 for ; Tue, 22 Mar 2022 10:59:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=e6PvkIW+DNbH7Qm+vdfeqUICnH/qGBZ25IB/cGeBYDY=; b=vFPFW5WANB4Bg8644W9I+/x00DquIabDgc4nT9J1+9d4DZKstV8SHhBohQXZ6RFtHu 1bvDquDLmYdZOqi5ZHK54HRdFOTH6A3bAaQlfAIRA5ssGAcpQlbLzazIzsB9zSKAMU7y ViKjd8uLQFRb3bJx+GfSrtpm+fYSxsLMCh+nAi0OFKWmFb1vm2YPjImDcVYW8rNtLpzC ErZadWkU8gpFDsiAV8X0VaiPlI4yqhiIkBh4+DSYxnYVTuHXHu+YkTVfUBRAYB/fFtQC dd5oozjKBkxy44YGfoNKuY7uyhu4p7ba/5u16TGP9a/w/XIxeffMccugW92uBm2XMSCL o2gQ== X-Gm-Message-State: AOAM530eb7qTj1SEIULsrTs/ThRT0E5o0egl7dT1L4LJorhDFJEZqzHi gj/MU/a7X4vA6N37VXY8mpRegy7Wl6Bz/nchIDiZq69+D2Joqg== X-Google-Smtp-Source: ABdhPJzk1ZZgrBfS4t6/9sitGc5w1kD94P4zfHc5eHhDpmPOhr4b9aW809f9b75VPOLMWBXf6fXdlmSvNb2XrpIIHig= X-Received: by 2002:a9d:2c42:0:b0:5cd:9e86:44c2 with SMTP id f60-20020a9d2c42000000b005cd9e8644c2mr1559734otb.250.1647971983992; Tue, 22 Mar 2022 10:59:43 -0700 (PDT) MIME-Version: 1.0 References: <1289b56c-e766-4889-bbb2-06abb4e63a6d@www.fastmail.com> <3496914D-AF9A-48FD-B37C-DCA54CB32AFA@cschneid.com> In-Reply-To: <3496914D-AF9A-48FD-B37C-DCA54CB32AFA@cschneid.com> Date: Tue, 22 Mar 2022 12:59:33 -0500 Message-ID: To: Christian Schneider Cc: php internals Content-Type: multipart/alternative; boundary="000000000000b4c0c005dad260ab" Subject: Re: [PHP-DEV] Discussion: String streams From: pollita@php.net (Sara Golemon) --000000000000b4c0c005dad260ab Content-Type: text/plain; charset="UTF-8" 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 --000000000000b4c0c005dad260ab--