Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114425 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 75804 invoked from network); 12 May 2021 05:19:02 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 May 2021 05:19:02 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 492041804B1 for ; Tue, 11 May 2021 22:26: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-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (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, 11 May 2021 22:26:55 -0700 (PDT) Received: by mail-ed1-f52.google.com with SMTP id g14so25563318edy.6 for ; Tue, 11 May 2021 22:26:55 -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=P6hjLf1OhJCCHtTicesFnQkLtVtwHAhbL7x22ALuUxo=; b=UjENQHRTa8Hjmm4LtPKyotyB/LEtgdo19PE7L8BZwSy9wPbaxBwQ6qWkSEsQOMJTKx V5obaUUGsCeBF7liuJJThWLlviFSle6Sebbvp5R2Z0Rg6ZL3KJlpq0eHJgXBNVFjjGs5 BL3HlE5oxfK6KEzdcAeKwrI1/eafKhArWXWtWHyutS3B/wm99DxW4HdQdgHn3j1JsMxv oGoQlWLIrCpNQuxwyGflcNET/XwAV7ASlPW3UQR9TihSAq8Iov4itQQw4bTHsCT7SlYa nRdUWATxOGvfOaMYL699dnCdzXYhSMTgQm3//uTkCYY2vzlR8ayJ09d4iKOZbK2R1YaS vl1g== 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=P6hjLf1OhJCCHtTicesFnQkLtVtwHAhbL7x22ALuUxo=; b=Go4Phn4pdPOikAcasNbs2gZS8i/OK46WnH3GWx56Hpiir3WeBPlhpPXPJBw7ubMREV AMiitVLKGEHASOEFYDn2Du0tW6/EwE/3pZlbwuC0com1x0gl+6pELlwJDjACHzvIm0ue mz+qX6IzNMMEfjZ/JfEvgRumn2bJGwGYG+GjQA0MvDq+TubWasFQ1lyhLkHne84beatk Q27+cmvBF4KwHiBWN0HKRMZ1SYoKAwGDlwzqkkd4fbQFcM1tS1MMZRCq2agJmYTtxSWk SkPF6IYUHgME3UeVxOfzRVeNl3lFwaBDZvRuJGJOyjjt+BkJwfKGKyVSZIoI9Wgvdztu gw6A== X-Gm-Message-State: AOAM533yQygeInGpEiLjWm16NiFwewPAXAzg9Brd9cM9ZANm5nqCiGuP 4r6q6qCPMvdQDdQdHJZx3tG5GN/LUEcUKtHYYM/u+Q63uu6xnQ== X-Google-Smtp-Source: ABdhPJyt+xp4iN63QV4Oqt/mGn/YPuLTx8wclNZU7aA8YChLlN5b2jlrvq4nytLa1WZ4ncvjgBIjRFYrAbusJ23q86s= X-Received: by 2002:a05:6402:6d9:: with SMTP id n25mr32822572edy.229.1620797212055; Tue, 11 May 2021 22:26:52 -0700 (PDT) MIME-Version: 1.0 References: <5650fab5-6006-4af2-b337-9e4aba67bf04@www.fastmail.com> In-Reply-To: <5650fab5-6006-4af2-b337-9e4aba67bf04@www.fastmail.com> Date: Wed, 12 May 2021 08:26:35 +0300 Message-ID: To: Larry Garfield Cc: php internals Content-Type: multipart/alternative; boundary="00000000000013dcef05c21b424f" Subject: Re: [PHP-DEV] [RFC] Partial function application From: drealecs@gmail.com (=?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?=) --00000000000013dcef05c21b424f Content-Type: text/plain; charset="UTF-8" Hi Larry, On Tue, May 11, 2021 at 8:55 PM Larry Garfield wrote: > > They currently do, since they work by creating a Closure-esque object > called Partial with an __invoke() method. > > --Larry Garfield > > 1. Would it be possible to mention the `Partial` class in the RFC? From what I understand this is what it will be returned by the `get_class($partial)`. I guess the class will be final (similar with Closure) and will only have a private constructor and a public __invoke method. 2. As now ReflectionFunction accepts Closure|string, wouldn't it be simpler for the users to just have it accept Closure|Partial|string to avoid introducing another reflection class and also avoid the userland issue you mentioned? Alex --00000000000013dcef05c21b424f--