Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109263 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 2276 invoked from network); 24 Mar 2020 11:39:35 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 24 Mar 2020 11:39:35 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 99CB71804C3 for ; Tue, 24 Mar 2020 03:03:58 -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,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-il1-f171.google.com (mail-il1-f171.google.com [209.85.166.171]) (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, 24 Mar 2020 03:03:58 -0700 (PDT) Received: by mail-il1-f171.google.com with SMTP id m9so16165692ilq.12 for ; Tue, 24 Mar 2020 03:03:58 -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=2wXANgfvuitLhXAmvHjlIMj6xnpc725MmC5yCQGXs3I=; b=Vf7D+wppg3whT0QLXWPiaUJJf9s3Jwocyefz+u/G7965s0UupME4daRaSD5bDZLO6E mcXnqy8eyUIcUv8nvOBrSP8dTZy2DgfFiNjDhGbxObPim60K4UHtV3IDxAcZB6lD31fn rDZrXjgcXuaam5wHwhAppbhORxIFp6wPJsoKZpecUwpw0Wcr+4Uvyfuwrpcl2jTS1QjF DvaBDi2tZGe1xcalqPrXiTUFV71d5rJdZTvwxd5MWEKVxHHqcnTIEv2V8OQrQCwAKPsJ /5o5jmFWcfI0O6B0JMEc7BBvblwt6PgY4//G9sst4pX6eydohYS+sTzKXegXMgGz1R9U IFCQ== 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=2wXANgfvuitLhXAmvHjlIMj6xnpc725MmC5yCQGXs3I=; b=YKaYfA7hPp+r+flwQPGWXY9X19SN5ePMXYnUbTN+IbTEm/4D9BjwnFB/o/Ix7n4VQu W73n3/zcNUdQ3XrlcwPBa5USRENINzXstoXgcdiYmbCUt3IDUtdH8A9SYtFhpqfEUhgT dwBLhwu2ZNL9/dvdtcUVa3rJvO72DBPYUkgZhfqSiKW9nbvWebTcDwCEe+KvmoA0TUuc 2917rj+7qbpAz+UX4ttgTbc+QJaHHKQ/HJg2vPxy92n20XA0YW8t4/KCVfT00Z4Ic5Pn IEzzM+e0KZKEvv460Nh56vOxGhCiOr6qMx7VBlJ2rUrinXy4C7Skki7+dnNbDaHoePQZ wRQg== X-Gm-Message-State: ANhLgQ0MJsq+Brq2RU9v4ChEZEv2ZpIuPog3LFa5qE7Pv40pjsulQ61F 0zHn1vx1w1fh7nyxzWU9fEmh2BQ6VXjikL2weMvW8PmBgVbHUw== X-Google-Smtp-Source: ADFU+vsBIv551EDIxd+nEEKT+t4OVNVj+uTzwGGwhONENUAageNoEb3gjiJ5a9+86dGgACgYFKVotrxrdPXFZmyx/6o= X-Received: by 2002:a92:88d0:: with SMTP id m77mr24086309ilh.282.1585044237653; Tue, 24 Mar 2020 03:03:57 -0700 (PDT) MIME-Version: 1.0 References: <003701d6013c$9afe9750$d0fbc5f0$@gmx.de> In-Reply-To: <003701d6013c$9afe9750$d0fbc5f0$@gmx.de> Date: Tue, 24 Mar 2020 11:03:46 +0100 Message-ID: To: jan.h.boehmer@gmx.de Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000bd1cf505a196de3e" Subject: Re: [PHP-DEV] [VOTE] Userspace operator overloading From: ocramius@gmail.com (Marco Pivetta) --000000000000bd1cf505a196de3e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hey Jan, Just posting here why I voted "no": it is not your implementation proposal, but rather the concept per-se that IMO shouldn't land in the language. Operator overloading makes call-site code reading extremely hard, and it makes the language much more complex for very little benefit. Everything suggested in the RFC can be done by using explicit arrows: `->` (method calls), which lead to expressively named methods and parameters. I have posted similar thoughts about `->__toString()` and `->toString()` when it comes to cast operations vs explicit calls at https://github.com/ShittySoft/symfony-live-berlin-2018-doctrine-tutorial/pu= ll/3#issuecomment-460441229 Overall, without type classes and infix functions, operator overloading is, IMO, just messy. Greets, Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ On Mon, Mar 23, 2020 at 6:58 PM wrote: > Hi internals, > > I have opened voting on > https://wiki.php.net/rfc/userspace_operator_overloading, which allows > users > to overload operators in their own classes. > > Voting closes on 2020-04-06. > > Regards, > Jan B=C3=B6hmer > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --000000000000bd1cf505a196de3e--