Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116677 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 98116 invoked from network); 17 Dec 2021 18:08:08 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Dec 2021 18:08:08 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EB2711804E3 for ; Fri, 17 Dec 2021 11:10:53 -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.2 required=5.0 tests=BAYES_40,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-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.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 ; Fri, 17 Dec 2021 11:10:53 -0800 (PST) Received: by mail-lj1-f171.google.com with SMTP id m12so4870001ljj.6 for ; Fri, 17 Dec 2021 11:10:53 -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=21Fo2dsQNcXNP4rDXCc1za67VC8jc3RdGJhQC8GvSDM=; b=FVKKiNzjJwgzMv5NlCMPv0pVSGwo6wdKyBordbksdPARk5UmgtKpyKt1hpcVpa+0bp 7kYAQTFnSk2daadCHCySQshCuVBkH64CKIBOaYRRgZPzYbXq/Xn9bAYk/mX0Mb9Qr26R Uy6der2rwb2s/tmwsefb6tStgi4Pt1BOXB5RMKvXfhQqAS0LTBGWYd2R6WT0+fxUssQ8 UX7KOoJgPmW8XERZmODBzy640SVL8+/SwUEwNfY1sxkIUS3go8b8TQzzti2JIKnIeauD Di3qZUI8/pL5y58PmSH5SdqOMwfO8nMhoCh7zvvu4eZkZ4xBcMsVGaaB2Qrir+KTrnYc KICw== 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=21Fo2dsQNcXNP4rDXCc1za67VC8jc3RdGJhQC8GvSDM=; b=QkPT5oa6xNAHjfJ5L93OpFgHF9nHvi6FbiWPNOnGM7lCzO0ZKivi69862WiXYP2mLj miQIO7QZK7y7PVYaKBwJe8PrL8YbQJ/jbaYjNwW6vBeY/2YZHeYJZAW3zSAA1NqoaZUZ GgW3wMbm3EnwxsOh+0v/pqTUBt5Ef5kGinLGpv4L7wkflYFbjAq6cWyZD2O6iNaz7qBl GdHYfwoT1NAQBb6YR6MN5AkYOj56lbpvm4cmFBdjrnDCyPcZgc+qqTZTdQVx3S3SW4qO iq5VL22kSpHMYtnNkW+bcIo2ena7gP3jozgjFqlxeEDGmBKA2xzfaIY/7A1r7CRUEUb4 IxHQ== X-Gm-Message-State: AOAM5307DckT97q9RLY69EQiQT+OLX6gya1QS5OaMR4UkYufxesyq921 V0W/D/xq6vqywkVW6JDRYJ75rCoGCJ+1j0tsLx+ykn0r X-Google-Smtp-Source: ABdhPJzIuMHBdrMdjteCUVHIsVZ/VJbCFVtYnC0DvAvF1+PpQU1bEVKHS0y7p27Fb+FDfmajhHeWTVO4z2PSkbB8k6c= X-Received: by 2002:a05:651c:1211:: with SMTP id i17mr4059688lja.340.1639768251899; Fri, 17 Dec 2021 11:10:51 -0800 (PST) MIME-Version: 1.0 References: <44b3fb4b-4693-1639-c8c0-5e17296c196e@gmail.com> <4b58c011-ed87-ba87-201d-0cf8e4116c6f@processus.org> <67431363-cd1e-9575-7d51-0f4d265d05b9@gmail.com> In-Reply-To: <67431363-cd1e-9575-7d51-0f4d265d05b9@gmail.com> Date: Fri, 17 Dec 2021 11:10:40 -0800 Message-ID: To: Stanislav Malyshev Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000002b221605d35c4c25" Subject: Re: [PHP-DEV] [RFC] User Defined Operator Overloads (v0.6) From: jordan.ledoux@gmail.com (Jordan LeDoux) --0000000000002b221605d35c4c25 Content-Type: text/plain; charset="UTF-8" On Fri, Dec 17, 2021 at 10:36 AM Stanislav Malyshev wrote: > And that's one of the reasons I feel so uneasy with this. When reading > this code: $foo * $bar - how do I know which of the ways you took and > where should I look for the code that is responsible for it? When I see > $foo->times($bar) it's clear who's in charge and where I find the code. > Terse code is nice but not at the expense of making it write-only. > I think that something on php.net that focuses on best practices and things to watch out for could go a long way towards this. In general, when people search for information on how to do something, if that information isn't in the PHP manual, they'll end up getting a random answer from stackoverflow. I'd definitely be willing to put in some work to help on such documentation. I very much expect that this feature will result in community developed standards, such as a PSR. Jordan --0000000000002b221605d35c4c25--