Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116801 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 75221 invoked from network); 4 Jan 2022 08:20:03 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Jan 2022 08:20:03 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 44A361804C4 for ; Tue, 4 Jan 2022 01:27:13 -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.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 ; Tue, 4 Jan 2022 01:27:12 -0800 (PST) Received: by mail-oi1-f174.google.com with SMTP id x10so53751004oix.6 for ; Tue, 04 Jan 2022 01:27:12 -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=flj/syn5ez55KIGUr04VE/uEaXtCe634RXSSEHNNALA=; b=IzvhVndivFfvliucAuN7lNEp7/pIIq9Hor7FRHM+hhnwJ0m8Lb7leGUAnTjseq2M1K NLvHy3VbSWz0ixgyTTyJ05HDj1LMypmMf4qTB6kWrIEgWazVR2muoGDVfgbryCVLDosC Fm8GM2PVjRxsTzImZtmw3uTshTf//uq90s+mhVWPhivHj17HMBWjCOCsEo2sx3TepyoX xwdtxUwd1bg7boAZPhCQgYKWGxeCZrFIOr+WVT+O+/xDlGlJpKPFg86dEsITR4fKzkrO gc+oaawXoNQA0qTxeJrHGtmcWS6cm/FwIadV0kHVo4tDNyy6pEPvfvcV/Qjd/0XBnaG9 SqnA== 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=flj/syn5ez55KIGUr04VE/uEaXtCe634RXSSEHNNALA=; b=qT10E3fqWhP/4cnRj23NW45KS9uINLX92oFNPadUXcNwZllKCARnGwWnLlqO6eOrdw mxcDjkpF1jegiWFeLVYGutb6NU5/T4OiaprK7ZdwKwBjXk7MonKZjNWArVLf8kR3Yc0L 38K/PFdB0yzmU8TT28cOK6E1D0CMIZ1FcQmaBvTvonKzM3g0DW+w7rBSpZQl5EoKbToq ssu+UfTEIEua1T9RCCBPOWpafd6Jne3OPKasjbfpLCILWf/vvcFAtGtneaL0db1ke2Fy FbA6aPVlC/UxLrBlzxlVA7nm16WWCqj47gJyg/GpeSn2MOBngReGJc4Lp72bmVX8CqIe uZSQ== X-Gm-Message-State: AOAM532soBR+2oIZbZP54Jsvyv/V8Bwbq4T8zyxrOx/TSqusk3OJJXU3 2ZS1eURfvoJ2BhPoOVH3bRF5L7/Cgp8TdwXFwhA= X-Google-Smtp-Source: ABdhPJyfxI3kTHaUphq7iH6C2KRj3IZ5cPe/S9MQotl9qG3IhwBWXd3uhiqrmekkG0tHgeyhhByfWzWkH44cs0sUy6Q= X-Received: by 2002:a05:6808:68f:: with SMTP id k15mr36971737oig.5.1641288431862; Tue, 04 Jan 2022 01:27:11 -0800 (PST) MIME-Version: 1.0 References: <3225c921-9b26-d2e0-f76f-45fff6f5a12a@processus.org> <40a1e5fa-396d-d9ef-93ab-6fcfb5054092@processus.org> In-Reply-To: Date: Tue, 4 Jan 2022 10:27:00 +0100 Message-ID: To: Jordan LeDoux Cc: Andreas Hennings , Pierre , Larry Garfield , php internals Content-Type: multipart/alternative; boundary="000000000000f486cc05d4be3d07" Subject: Re: [PHP-DEV] [VOTE] User Defined Operator Overloads From: ocramius@gmail.com (Marco Pivetta) --000000000000f486cc05d4be3d07 Content-Type: text/plain; charset="UTF-8" Hey Jordan, On Tue, Jan 4, 2022 at 3:23 AM Jordan LeDoux wrote: > > But why shouldn't it be `==`... these are valid use cases for a > comparison; equally, vector additions ($vector1 + $vector2) are quite > commonplace in mathematics > - Source: https://twitter.com/Mark_Baker/status/1478131480383606787 > > Marco's response to the person who maintains the literal largest complex > mathematics library in the entire language was: > > > Yeah, so use matlab? > > This is what I'm struggling with. I am seeing a lot of things here that > sound an awful lot like "that's not *my* use case, so no". That isn't how > you design the language. Nikita's objection to the syntax is much easier > for me to understand, because it is based on *language design*. > > Mathematics isn't something that is never used or never needed in PHP. The > idea that I need to justify this statement is somewhat alarming. > I know you're picking on details here, but believe me, I'm serious when I'm saying "use matlab". In fact, I did work on financial products where (from Java PHP and Python) we used the MATLAB Compiler to create binaries and dynamic libraries, which would then do the heavy lifting around the financial models that were in use. > Likewise, I have libraries for Matrix and Complex Numbers, where this > would be an incredibly useful addition.... a similar RFC using magic was > proposed 6 years ago, and sadly never made it :-( I hope this time it is > accepted, especially as a new keyword feels better than magic > - Source: https://twitter.com/Mark_Baker/status/1477957056464359427 > > The libraries that Mark is referring to, markbaker/matrix and > markbaker/complex, have over 105 million installs combined on packagist. > (Source: https://packagist.org/?query=markbaker ) > As for the install count of markbaker/matrix (which, by the way, is an excellent library), please do keep in mind that those are **directly** coupled with phpoffice/phpspreadsheet ( https://packagist.org/packages/phpoffice/phpspreadsheet ). In fact, all OSS dependents of this library are just forks of phpspreadsheets: https://packagist.org/packages/markbaker/matrix/dependents?order_by=downloads&page=1 This absolutely is not to diminish Mark's work, which is stellar (and frankly, I told him multiple times that he should just get paid for it, since spreadsheets run the frikken world), but to show that this is indeed a niche use-case. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --000000000000f486cc05d4be3d07--