Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120400 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 9342 invoked from network); 25 May 2023 19:32:45 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 May 2023 19:32:45 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C6866180083 for ; Thu, 25 May 2023 12:32:44 -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=0.8 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,MISSING_HEADERS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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-oo1-f54.google.com (mail-oo1-f54.google.com [209.85.161.54]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 25 May 2023 12:32:43 -0700 (PDT) Received: by mail-oo1-f54.google.com with SMTP id 006d021491bc7-55554c33bf3so6899eaf.2 for ; Thu, 25 May 2023 12:32:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685043162; x=1687635162; h=content-transfer-encoding:cc:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=kqrdjU6+KVXqZyiyqAKAmNKB02JyOdiDX2nTZPEVD+4=; b=nZEzEBYIutMWxLVYwSIKrqKVHYwW9zgET46NtS5jPMOkjpt/E+UuEhmCYPGFnFM2QV WNLbUTe4rHpebz2jX6UqOVifwF/y8gzLL2z6uxxVYXjBCdasXcqNkun0HFUSUtQe+KPS mkDMADg4kcN9JCL6cqoC3tp+mBb1EFzxn328Z5nL1NiQbQDLVcu2myVxJo6YKhYjYlg9 zhpMvoaKzt8ULfQwcld4N3EI8+x3txioUn45uo6eColKmT/rsW1iS0hqLoIfwh5dGlmf 0dDpV6IatB5XUld95cyu5JBK6qr6+vBORkkloGalcAb7bMyEEWae8bxC0yEtdCzeOHNL Y9Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685043162; x=1687635162; h=content-transfer-encoding:cc:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kqrdjU6+KVXqZyiyqAKAmNKB02JyOdiDX2nTZPEVD+4=; b=a55L9x8FebtKUXwOrg86bXDjvDPlWgO6IZtBYEPdZew/qGk7BeiePQtcV1OxiqMGa+ ATZSkWg1C2Su15JnUtHJFTvnNfGYoPHmcmZAlRcMetKaUeeyLeOzz6NKPMljtXP0tjNK nc+ECPNQBJEMEJ3HMNa92tAz50osUeWpavBPnpaUAwKPkME79Pxx7lGYABGuSe5Z/5mG dbvE1VvZ+L16TPYsAC0Qz0OJvx7tfrteukl1Z4hcjRKbAiZm7wRtINHOCWxY4YDqdX8C V8NK7CfDcOT5UQoAwqCwk4BUShvJ8pyoi5SoR2zrO4fXNePqO52YGPNAhuk3ysBO4G4m aN5A== X-Gm-Message-State: AC+VfDwrcT2ZK+caV6HbkerNnoTMpRUOJgC/GPh0I6RPZpIsZzyzzwiv i1TXr7wazI7zjQlIaw/JUu5JerNG9rwh/Y74kVYYAC9+FPnLGw== X-Google-Smtp-Source: ACHHUZ7E1/69xcWJbA2/DbHvF8D4230aK1iNLRAJITrgPZcJ1qwzHAIcLNsd8Bm4leqh5QrO2aBR0hfYT//wdvAz3+s= X-Received: by 2002:a4a:3454:0:b0:555:ccd3:6ea0 with SMTP id n20-20020a4a3454000000b00555ccd36ea0mr1617913oof.7.1685043162616; Thu, 25 May 2023 12:32:42 -0700 (PDT) MIME-Version: 1.0 References: <5e35344e-e885-4b65-8f86-2cb43330af46@app.fastmail.com> In-Reply-To: Date: Thu, 25 May 2023 21:32:29 +0200 Message-ID: Cc: php internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] [Discussion] nameof From: landers.robert@gmail.com (Robert Landers) > Using a :: pseudo-constant suffix rather than a ()-based construct would = help with the syntax clumsiness in both cases, but wouldn't entirely elimin= ate it. I don't have a really great answer here, unfortunately. I think I= 'd marginally prefer a ::name suffix at this point just for syntactic conve= nience, but I'm still undecided if the overall tradeoff is worth it. (For = ::name, probably, as that would be a much lighter syntax impact for those u= nusual cases that it's needed.) I believe Lydia suggested something like that, and while I kinda liked the syntax (better than nameof() for wordy-looking bits), it just looked weird to me. I'm not dismissing it out of hand though. There might even be some middle ground where nameof() only works on functions/constants, while methods/properties have a ::name pseudo constant. I'll have to play with it and how it feels.