Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116768 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 53450 invoked from network); 3 Jan 2022 00:00:16 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Jan 2022 00:00:16 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B772818053C for ; Sun, 2 Jan 2022 17:07:04 -0800 (PST) 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_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS 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-f54.google.com (mail-ot1-f54.google.com [209.85.210.54]) (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 ; Sun, 2 Jan 2022 17:07:04 -0800 (PST) Received: by mail-ot1-f54.google.com with SMTP id o3-20020a9d4043000000b0058f31f4312fso39844968oti.1 for ; Sun, 02 Jan 2022 17:07:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dqURUJ1NwYrKKzblwGAt41UFtDJ5O5Z2+2sEcM+MZ34=; b=qwej/OmFWriZdaCvXX+KibQEiRdFwgfjGtk9DNnFG/nDTO6DzEflLrhXK0kXTIYbWv dMmoA0Mg003fVM5IvcfQqYN2wxY8pA/CiT6kOjCId0khzUXUWpGn1q96loIKaEnueKK8 GpfTMFn7466kgyGTDLizmFaWx2tof90aI2kl6E8OhOdIUaf6VjTuvkBcwddWuQdbyirT J2H1AmQ7tzq2yGX/SyqCElP5BbQKT1Jr6Sza5SdQSLF14lgsFTrWmqEpdFbsPwe6rt84 jbDQT0uQTddYk9qfqTwVZUFSqCS4VNDoHyYShnQs+IZBnyigmc7XeKKrZj3fP9NitFwW aT7w== 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=dqURUJ1NwYrKKzblwGAt41UFtDJ5O5Z2+2sEcM+MZ34=; b=FN5GUoVCOkcAIjfb4ud/R6kG2GlmB9xwCoyGj905tvE/PpkXQVT/njsURF9WQIjbxZ BEojZObrUK+oEHcwpwzZtNWS9IsVIJ64aeZ/z1OwUynxnF+wqgdrFtBiLlA9n1eu32Ki RZfF28AEaZp2aUG/kxTSYU+I+IIxZvWqCawvn4GTp46Fx/t8/HuKGhD4+alqiN+7WsNC nwnVBUP3iw8D11Cp6N1O1BDxuScIRFTRXBCjaFZLMPJskIWGRWv3x/XJI1wghwop57Yn UV9Y/jCDGsthh/0NBtVQPaCFRx3qAIWg38hUK4DYM/9dgBD7K19kD0KJAvS3jp1/U06O InnQ== X-Gm-Message-State: AOAM5307uauc9FlAe0nzqCySchH469k4UEwQXB7tAL0MGXgEVGkTcy4g C1YAzu6RkmXJTtBKb2wliJ628T1O9+V7FCjO19I= X-Google-Smtp-Source: ABdhPJy+oZFChcgpO6zWCcnpgP8vW9iy6QUutX2obXon24FnvCb6va7O0TdslPP9HJFFySbos1yKWXAaHfB/jAEKKuE= X-Received: by 2002:a05:6830:4119:: with SMTP id w25mr30626917ott.98.1641172023010; Sun, 02 Jan 2022 17:07:03 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 3 Jan 2022 02:06:51 +0100 Message-ID: To: Jordan LeDoux Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000007268f505d4a32380" Subject: Re: [PHP-DEV] [VOTE] User Defined Operator Overloads From: ocramius@gmail.com (Marco Pivetta) --0000000000007268f505d4a32380 Content-Type: text/plain; charset="UTF-8" Hey Jordan, I've voted "no" on this one: infix functions may have been interesting, but adding a whole new type system around operators is really not worth it, given: * Added AST nodes * Added method definitions for niche use-cases * Complexity in support for static analysis tools I personally don't see a reason to introduce all this for examples like the one with GMP, which was more readable before adopting userland custom operators. In addition to all that, we didn't even achieve custom operators anyway: it's just the built-in ones (this is why I mentioned infix functions), and the precedence, number and type of operands are fixed too (yes, it is a sensible starting choice, but very little "custom" about it). Overall, your RFC is exactly what I would expect a custom operator RFC for PHP to look like: I just don't think the feature is needed at all, as it only makes the language much more complex, for rare cases that I hope I will never ever have to debug in future. Greets, Marco --0000000000007268f505d4a32380--