Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116632 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 56782 invoked from network); 12 Dec 2021 21:19:17 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Dec 2021 21:19:17 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CD13E1804C3 for ; Sun, 12 Dec 2021 14:20:49 -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=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (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, 12 Dec 2021 14:20:49 -0800 (PST) Received: by mail-wr1-f42.google.com with SMTP id t18so24093719wrg.11 for ; Sun, 12 Dec 2021 14:20:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=1hwZwpqsgoUc5205WLIOuRz08Wf2xJFRcU3Eh2Xd+qE=; b=cOrClqs2EDOUajXEajajWGJBbT8muUXi8I7VNlm+Dj8lmW4l9HPPLWYiT/m5cqw86p qrQASB3an4xvckBzdMcuXeGT/krtMcCead11t7pSiXIgBXKiXlcMD9z46VWPox/jvZj3 WrapHibbXTvGb0vJk4Un2AtgZgfa54tnYOZ9YhHRPRTx0Kj/Hvnak3ph8c6blAKhsqOg rOCD3fle4Le5dkWfTNNrBDEJCUMd5BaNoZ5ngb69xibO5OGHeqERUFyyGlg+URQmLvw0 N7J84HhndlZgL2LyXUodYJpag5NXy3By93IFZ65vEIX4n9nygMMZeGhil2KMdgSoE5/y K4IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=1hwZwpqsgoUc5205WLIOuRz08Wf2xJFRcU3Eh2Xd+qE=; b=fLKKmWSdjqAcW8n4q0siA/79Jlntdmu68LaqdliRfUN135hyfE2osx0hCHoj8l299V VYaRqb+CP+acmfBUn5BRQXwY8cPnAjHNeWYADMv62INv0vqf3rbdhVf2lO8+TmxAWPlQ fEmz3U99EUqSRHTE/nodFCCLlS/QqZ1cYXbyy5iap2jo4L+BTXRuT5czyWb0IkmYPB6F YDoVyFwQtIzHnB3GSxJk9OWaV73yjzNtq+l/Ofx+bbMGvE723R0kuN9wbRy8EmbeGHi5 5b/CJpbtTPKyxSbTBcpO4QNvyTmIerKPJuj/MJYL4bc9VpfKyQhpBWAQozFh4zq2I7aL PrBQ== X-Gm-Message-State: AOAM531V8EzqZ39hBwecPf8IVoiG5NpH3ECBtICAhb0FDx+rp+2Bz8Fo Dw2sSQD9Q4gXSlAbVC9O8ZbtpwsJscM= X-Google-Smtp-Source: ABdhPJyniL7wCsiIJgtlcIR3/D6StRg9/KKaXaQ9/0N/tAlp8OVr3FMunYH4vImnoWiPfxyAp2wUJQ== X-Received: by 2002:a5d:6244:: with SMTP id m4mr28241638wrv.186.1639347648080; Sun, 12 Dec 2021 14:20:48 -0800 (PST) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id n14sm10001616wrf.69.2021.12.12.14.20.47 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Dec 2021 14:20:47 -0800 (PST) Message-ID: <6b6250dc-23be-78f3-f156-c7815cc7cb71@gmail.com> Date: Sun, 12 Dec 2021 22:20:45 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Content-Language: en-GB To: internals@lists.php.net References: <7126a5cb-fdaf-4e50-b8af-7d95965d1125@www.fastmail.com> <96304dc4-7577-4d4e-a1b2-63e707ea30dd@www.fastmail.com> In-Reply-To: <96304dc4-7577-4d4e-a1b2-63e707ea30dd@www.fastmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] User Defined Operator Overloads (v0.6) From: rowan.collins@gmail.com (Rowan Tommins) On 12/12/2021 22:01, Larry Garfield wrote: > If the list of operators is expanded by the engine, yes. The point is that IF it were decided in the future to allow user-space defined operators, that would be considerably easier with a separate keyword. A real-life example of this approach would be PostgreSQL, where a user-defined operator can be (almost) any combination of + - * / < > = ~ ! @ # % ^ & | ` ? It would be *possible* to have an open-ended naming scheme for these, such as "function __atSign_leftAngle" for the operator @> (which conventionally means "contains" in PostgreSQL) but it would be rather awkward compared to "operator &>" or "#[Operator('&>')]". Regards, -- Rowan Tommins [IMSoP]