Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115303 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 69164 invoked from network); 5 Jul 2021 14:14:28 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 5 Jul 2021 14:14:28 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A2530180545 for ; Mon, 5 Jul 2021 07:35:59 -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,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-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) (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 ; Mon, 5 Jul 2021 07:35:59 -0700 (PDT) Received: by mail-lf1-f49.google.com with SMTP id r26so15352726lfp.2 for ; Mon, 05 Jul 2021 07:35:59 -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=yWuQB5vuatAZd+ZSreQs8+dhwu1KPwK4WFkatVVET1s=; b=b5R9/i0YTRxO9uiJtlfqT0oRyoSdZgxGgiTLBqA1sG3xZh6Vk7Ac1Ib7A0g/hI96ii D8j3ijMlQuiVs9t8HVc2hN+dkVCpI5m0Dq7HV1GDpXyAIuZvwahhLrxqhjCaoiRwGJxW wqPJtyeEqi6hVPio6a/0voo3HTdbvlaIEkFnDOcYhcKeV+ICCtqMpWUGfe2TaQNbJrv0 D++fKrgmQMn7VThNevFGUcouDLGSM5BCjM7ZaO08sWpxqwKMI2p1/R2227oMFXPvFlDF BGgeH9/csmN777JfZIC5/qYseNBLhbOqIGvPF3vp3su5afXTJ10XHAElDBi0Yxo+aCPt wwWw== 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=yWuQB5vuatAZd+ZSreQs8+dhwu1KPwK4WFkatVVET1s=; b=fGwWlRMsFBKRGSfyhCJawty1IIUdYuLbug9AhXA2h6xnEj6vdjFTmQFJXd0CPE8kXt CGOARvZCmrG/gcaBLBKe7E48PuK8zZn+Qk5kEm5qa+kt0hAC8UAnqtfQfilhMTaFcHEm HCgEZPuBZ+D2zJh3P7JbP9wzs2QXoPrZqc1ivpO+Mr3dponIt8Akzs7Zrku+N/tBvur7 ZZP5L8lX6zhUYJUxTF3wejJVL7Eul8vZ48b5UrGavVdh3Q9c2Kc7pUZt3S5E8es8bmnG UWsJ9RLjsYbKcJadeAC1vmJS5HroVoiYBX2+dh0ZxHOIYSNe3P1AXyetnVHhjKl9r8pM zNAA== X-Gm-Message-State: AOAM533eubVRNesNhPmAgyNiyYc9BskrvHzmg4ORXrD+NIafgs3MAoyl 1ayW/c3KNUow23oJn0dwJkstf6ZXoZAcfdIo0/4= X-Google-Smtp-Source: ABdhPJzfJLraYYS7S2QrIwLAkuKxnIvjDBPaTC7wrWnSITTuWENLUdFXwyj6L8w200G/Q+CnTSlVk8BkMzNkPfcIp4o= X-Received: by 2002:ac2:5283:: with SMTP id q3mr11263390lfm.44.1625495757333; Mon, 05 Jul 2021 07:35:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 5 Jul 2021 16:35:41 +0200 Message-ID: To: Sara Golemon Cc: PHP internals Content-Type: multipart/alternative; boundary="00000000000033277805c66139e6" Subject: Re: [PHP-DEV] [VOTE] First-class callable syntax From: nikita.ppv@gmail.com (Nikita Popov) --00000000000033277805c66139e6 Content-Type: text/plain; charset="UTF-8" On Mon, Jul 5, 2021 at 4:14 PM Sara Golemon wrote: > On Fri, Jul 2, 2021 at 5:51 AM Nikita Popov wrote: > >> As the partial function application RFC has not been accepted, I have >> opened voting on https://wiki.php.net/rfc/first_class_callable_syntax. >> The >> vote closes on 2021-07-16. >> >> This RFC uses a syntax that is forward-compatible with partial function >> application. Should it not be accepted, I'll explore alternative syntax >> possibilities. >> >> > Was replying to a comment on reddit which made me look closer at your > implementation. It looks like this does NOT allow for use of function-like > language constructs. > e.g. $e = echo(...); $p = print(...); $r = require(...); // etc... > > 1/ Is this intentional? > Yes. > 2/ Is this actually a good thing? > Yes. echo is not a function, so you can't acquire a callable to it. The actual echo syntax is echo "Foo". PHP allows you to write echo("Foo") in the same way it allows you to write echo((((("Foo"))))). Don't do it :) Regards, Nikita --00000000000033277805c66139e6--