Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115205 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 88049 invoked from network); 29 Jun 2021 08:32:34 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Jun 2021 08:32:34 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 21A651804D9 for ; Tue, 29 Jun 2021 01:52:32 -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, 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-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (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, 29 Jun 2021 01:52:31 -0700 (PDT) Received: by mail-lf1-f44.google.com with SMTP id bp27so13042017lfb.9 for ; Tue, 29 Jun 2021 01:52:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=6Q0BOrPKxw+d+Rkmk8GIl1lR8Fj4PDry/hB5ee8BxaY=; b=WKQV1Wsae2nRQiGV716U0qmC/8pGSDXv0m020LevoX4kDBa8c/9woAg2dOrHY/h+pW SiVWP1DxlsLyLywWk/EJ8Q0o31jFyXjzfthliD1XOfRBKU6Yt3pda9EcD9vGpV2qPuUW erw5Z8K0VChTSzm9cZ40CpSWi5a8kQnkkU2QtFZgL0U4XQUoB1eYGMMvk1OeFlhhrgoL V0IR/mImxCku+brwKfbj2pF0RT4m5QJQQra/O8bHpQ7L6csCojqoopeOiQvJ1uPVm0LA Ui2gvffif9jSyKBNf74DPhNpeBawf/zo8lXyhGxZmQssSw+y6vRDoC8ZHAAqB+zwMwQk hSAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=6Q0BOrPKxw+d+Rkmk8GIl1lR8Fj4PDry/hB5ee8BxaY=; b=dXGUAnx3FyqcZUMofZ4BjAvBfKuE9FssV3ke7IFKrin/SUPGTFTVl9jqeduHabjOry /PsdMGA4j0p6DI5e7qBdoeU087teXiUapoT4cRQrxNBjEYlGM7in5ABk24XhYzFSQdi+ /1MCezyhQt14854kq8DL1xEPQ3rZAqC6IpnBaWfdaKC1EhgK+xr1Q0LGXLxwhPd1Db60 Q38HLJDUQRJyQnQtCZOVCjgZC8kCkR3wX0yeDW9MosT0v8EUmFKQYN9E2XiSmuKpGU5Y I7xoRUFSHTbGngHT0JmZuSnEIY6s0DhR6gt5DWDc3yvc2P1PK2hXFYNnA9PmJSD8Vpez /1uw== X-Gm-Message-State: AOAM531ewmknGxIE914vMoi75uHqqKfFnReSgJFu9wxOkH7Vhn5ZQ22D wDIWnwjQdAu1uT39IxuxrR28qocHr60aIwjRiSQ= X-Google-Smtp-Source: ABdhPJy8BpGLg5FfyMhMb6HjfyYwZAIYgXwfIqIm4tAaFUdFhZfkMvnuadCKY3+ai7HUtjS6KN1gZAk0boCjbuq9CSs= X-Received: by 2002:a19:c195:: with SMTP id r143mr21963671lff.61.1624956746286; Tue, 29 Jun 2021 01:52:26 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab3:7506:0:0:0:0:0 with HTTP; Tue, 29 Jun 2021 01:52:25 -0700 (PDT) In-Reply-To: References: Date: Tue, 29 Jun 2021 10:52:25 +0200 Message-ID: To: Nikita Popov Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] [RFC] First-class callable syntax From: olleharstedt@gmail.com (=?UTF-8?Q?Olle_H=C3=A4rstedt?=) 2021-05-20 14:48 GMT+02:00, Nikita Popov : > Hi internals, > > I'd like to present an RFC for a first-class callable syntax, which is > intended as a simpler alternative to the partial function application (PFA) > proposal: > > https://wiki.php.net/rfc/first_class_callable_syntax > > See the Rationale section for details on how this relates to PFA. Over the > past week, we've had a lot of discussions on how exactly PFA is supposed to > work (most of them OTR), and while we seem to have a tentative consensus on > the correct model to use (which does not match the current RFC), it's clear > that this feature has turned out more complicated than originally > anticipated. Joe (who provided the implementation for the PFA RFC) is also > concerned about the implementation complexity that the final model would > require. > > At least I personally was mainly interested in PFA because it provides a > first-class callable syntax as a side-effect. This RFC goes back to > providing *just* that. The syntax is forward-compatible with a future PFA > proposal though. > > Regards, > Nikita More bikeshedding, sorry. Was a syntax using `fn` considered? Like $fn = Closure::fromCallable('strlen'); $fn = fn strlen; or $fn = (fn) strlen; Olle