Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109287 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 18552 invoked from network); 25 Mar 2020 12:59:21 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 Mar 2020 12:59:21 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D8328180543 for ; Wed, 25 Mar 2020 04:24:00 -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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, 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-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) (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 ; Wed, 25 Mar 2020 04:24:00 -0700 (PDT) Received: by mail-oi1-f174.google.com with SMTP id k18so1750580oib.3 for ; Wed, 25 Mar 2020 04:24:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZUy0idVocF9yPmgyjphPaEzAFfcfa3T+sfwVZ4bx+pc=; b=i6qjt5fZPVwgPyT7xXRL/uZGYiv8IKTxcVqsCo6KDelmkgdiM5ypQCBAGPoXrX+aS4 XmObmZ4xNbgmJgKDvDvqbxqSN3NtE6twwL+mllCMfhzSUawLvb01DQQmiSw354tKP4Kl 6GVcnHhqu/byDyQ6HAMFtSiMSS6XO0G31nWR4rkLklFuQqlJVJ0UycWm4ZLaa9ABPuKw qtsvSEupy86U3q1440hZ7KlgXHTeMpIOb6jnSrsAhm2rTNI6u9CTb0cK9J2H8BBeAHyb FlAIQ0LsagsKYcgjkKKM9nGrhf9JXTRftI1qYHV7FxgFgFamxXHdGGA5QpCKEqf1Gohd 6ZmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZUy0idVocF9yPmgyjphPaEzAFfcfa3T+sfwVZ4bx+pc=; b=sLRer3LuhDrz7JJQJJlk8RMHfvb9ezp2pC/q9j+r0qKdF94rY4AT/dXJE2ezvOcP5m +o5TGRLmpSHMnevCOj/b//V2UMVsKCSkT6qb21Rh4KbFa8PSFmwVkYbY/mcTfGevXi4T ff0O8MuE0yB6aCJN0+n5mJvLJSV2YxxsweZhudGGjRBkNiPQn4EFy8Gc68RIQE6pzCZO jUsMghXZkZ/rZNNtpuHqjAD5d68UuB4rMKbs3mufdgEbjgwye3vmB21bzs7Cq8I2zWRE MvnYPb1mb9kjhRX+Xa8ZeBNNrCYFCgBaM2GcjLp2hwRMcLNcMMKJ0PKtLLf4DJrTlmMg J4ig== X-Gm-Message-State: ANhLgQ3HLNNj6DPB3IM0euB4HpnKFlnT3+mROVUC+0hnNHlgG1Ftl0IP KBN4p2XVPwyoGu3829HjKE29IAVdzIOn39akbZU= X-Google-Smtp-Source: ADFU+vsHaiTNNLjkr6Pr440U+9BB5Gyc7UM92xdU8ghCQO0kvLZ+bpKiNTaxUm7ktkgIEVhGZAxkyaVOKOAIOSdEjQ4= X-Received: by 2002:aca:4b56:: with SMTP id y83mr2131888oia.142.1585135435278; Wed, 25 Mar 2020 04:23:55 -0700 (PDT) MIME-Version: 1.0 References: <003701d6013c$9afe9750$d0fbc5f0$@gmx.de> In-Reply-To: Date: Wed, 25 Mar 2020 12:23:43 +0100 Message-ID: To: Nikita Popov Cc: =?UTF-8?Q?Jan_B=C3=B6hmer?= , PHP internals Content-Type: multipart/alternative; boundary="0000000000008a6b9a05a1ac1a22" Subject: Re: [PHP-DEV] [VOTE] Userspace operator overloading From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --0000000000008a6b9a05a1ac1a22 Content-Type: text/plain; charset="UTF-8" > 1. This is exposing functionality that already exists for internal classes > 2. Because this just exposes existing functionality, the amount of > technical complexity this introduces is very small > > 3. As mentioned, this functionality already exists internally and is used > by GMP, where it works (imho) very well. > Thanks Nikita for the insights, that's really helpful. I'd suggest removing the "PHP_OPERAND_TYPES_NOT_SUPPORTED" constant and settle on null instead. The reason is visible in the RFC: `public static function __mul($lhs, $rhs): ?Vector3` - nothing else than null can be returned here when looking at the return type. Returning a const is just calling for "WTF" indirections IMHO. I'm still voting yes, hoping for this const to be removed after if the RFC passes, if it does :) Nicolas --0000000000008a6b9a05a1ac1a22--