Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114548 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 84893 invoked from network); 20 May 2021 21:21:50 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 May 2021 21:21:50 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E13FA1804B1 for ; Thu, 20 May 2021 14:31:56 -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,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 ; Thu, 20 May 2021 14:31:56 -0700 (PDT) Received: by mail-wm1-f45.google.com with SMTP id h3-20020a05600c3503b0290176f13c7715so6031881wmq.5 for ; Thu, 20 May 2021 14:31:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=gmxUJY5sPoLXTFjMKwhT2paFxkTYz2X3RHZ5RsX91UI=; b=m3NWvEHD5yFkvLJ0Zug1EtFm/s5GyWC2O22xTtBwN8LodppMChdh8vW44EmGe4aGO/ An3zF67QrXojtIMFK1C3k7cswRo+gUAwOsuKrxl/XqabAP/syfTrZXbJHdg3O/uNTQrV sEUndK8LJiV1RYzr2N9pIiWH23p6fbnv6YQYsvA5hUajyDamYHYa2xV5GD/caOELNKM+ 5VxRZP3xSGAz0bl1q4i4L2VwM1R4mqGKjo+MvmxSaqNhunaS6dTXLq/dQYgxA6KylTA/ fm7REU0Zx+QmpMrtVzTcbTkkaYulzMjWvkFuO1xh+s8iFmyXZ3nkOxSPV0tktRwbTRbd W0uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=gmxUJY5sPoLXTFjMKwhT2paFxkTYz2X3RHZ5RsX91UI=; b=Fg6ssRJKQjx2dT/P9SU8XwsgNJeZcBGqI/KeYJCPPZNxadelx1DaQS5cFvfNVUWrW1 fiuMqnG31YhuQn9aNuaVjTTj40a6ZybUu7/s1pr74Hf3WBFHX6+Er8Df0/KXvc3IPSvd 0agp8xgwIFsztS6JAEF0/1CVx9GoWAU4fX/XeJPgpC6KKOk25lp/V5CYYTdqMQSghwAf 359T1EB76JRsf3r4wo6s9hvaPhTje9zJCBUWBiEybmDcR+wxHCX2OwsfD6lpswHpLwls gbDoMyTxg7ULVYYwoXXvCMAV3wwp7k9kDKL89xUbOnaPVc/02ZjcqU6YrVBt5hhabax5 5Gyg== X-Gm-Message-State: AOAM532e5eWI2obk+IYUsMMNxzNcYMPLtJQoft/FgsCZL2uE23xbsYhi 6S++h33kINGvcpF9zuqRuJBT37sj4vg= X-Google-Smtp-Source: ABdhPJw6ptIDLrF9Pb+yOsA57YBZaNzMJDdB4cILYEh5/ebzDP4AII8WqOslctCiyBYri8OwuofVew== X-Received: by 2002:a05:600c:4ec9:: with SMTP id g9mr5214267wmq.173.1621546311391; Thu, 20 May 2021 14:31:51 -0700 (PDT) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id u8sm9532599wmq.29.2021.05.20.14.31.50 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 May 2021 14:31:50 -0700 (PDT) To: internals@lists.php.net References: <1a024ec2-60c0-4a48-5f1e-4a4369a6a642@gmail.com> Message-ID: <052eada8-dd1d-059f-6ce5-4870174b1c1f@gmail.com> Date: Thu, 20 May 2021 22:31:50 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [PHP-DEV] [RFC] First-class callable syntax From: rowan.collins@gmail.com (Rowan Tommins) On 20/05/2021 21:54, Kamil Tekiela wrote: > This would be less confusing than the (...) syntax IMHO. Of course this > still has the same ambiguity as Rowan points out. Is ::$objA->methA a > property or a method? We could solve this problem by specifying the syntax > to always refer to methods/functions. Parentheses could be used to enforce > access to property, e.g. ::($objA->methA) would evaluate the value stored > in the public property of the object $objA This is precisely the kind of "solution" that I referred to as easy for the parser but confusing for humans. ::$objA->methA // method (::$objA->methA) // method ::($objA->methA) // property ::($objA)->methA // method? (::$objA)->methA // attempt to access a property of a Closure object? It's just a mess, IMHO Regards, -- Rowan Tommins [IMSoP]