Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114505 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 7333 invoked from network); 17 May 2021 15:38:33 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 May 2021 15:38:33 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5C27C180537 for ; Mon, 17 May 2021 08:47:49 -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-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.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 ; Mon, 17 May 2021 08:47:48 -0700 (PDT) Received: by mail-ej1-f44.google.com with SMTP id l1so9912822ejb.6 for ; Mon, 17 May 2021 08:47:48 -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=3eE6FGNGFQH2ZooPTJs24iBrikCi7zJT5UGRLOIR/dU=; b=g5tFD1Ub6Jyt47rOuF2/q1ayB7Frt/+vYGzdaxbGf0w+rI5CUeZ71DPY1AY8kjFGdP GL0ESIX8MCY8aG2lhyJgti/CA0MK4CtJnlFTeixKBG9aAB9QYdR/AwrMomtw47PnsjTi kRaD6J80/MBM3G8HAZo25j2uZzc0dqTpGen4nqL+Ido1naUi4q9WIJ6XNZVmVYbC+IbY q6p62Lrp9+aSifNjNPZgdko2SFZpMJXrm9k7Lbf1n0JVQNwDPRArqonrpiF1nocAarm5 al4okZkXKYyp5gVjYk4Te48PO/JVd1aI5VJudyS/Nhe7Yst6Ovcoo/oo6Afmwlg5ZZeH hcwg== 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=3eE6FGNGFQH2ZooPTJs24iBrikCi7zJT5UGRLOIR/dU=; b=jgnk5nFaBaFixG9Nphm33DrtOuBhPDTSbOO1/24OUBL8dDEfNPfCy6QYf9MvQ/aKLt nlVCiB1+vxMqL6X6GyTqGHY4bunTlEtR/Y2Dtz/4rtpiSm1WShQsIsJhOphZuOymYtAo P7+Dbai5xql4R0vcNbXMl2QCBmNY3IrV9ubTHgw/uUFArk3XU9xCsMDFiP7D7o5erBwk qJjXab7zcAqYNCehuuy222DfsAYw11XmvvKgyzJHq4HaJZ9abu6j4+Nm1Jq61FTbP1Rc Q9vJuQMastKlA9BB8vxtLw+PbqCjYiYVCPyydcrcLJyGlhswJm1gvm56hbIelDdfAZ8N +DXQ== X-Gm-Message-State: AOAM533oh2drL4dqhZHmDC2JFH6Q17nvH68Leo3GOWA4Pj/8E7uzM6qX CsEUuxXEW0iBnYVnURbf/qdQxzSrWf0hEdnMBi8= X-Google-Smtp-Source: ABdhPJxCrGXgcN2g8GLmhhPQEAdmtz0wx+qVNtBMoKl2OzXTEOc5PLuM5uVmlr1puH3P8FamDn3oiX5Gm8/PfFqFjpE= X-Received: by 2002:a17:906:3883:: with SMTP id q3mr580791ejd.4.1621266467503; Mon, 17 May 2021 08:47:47 -0700 (PDT) MIME-Version: 1.0 References: <1565EB81-57B7-49B0-A47C-342E0088A432@trowski.com> <09B663C3-E21D-432B-BB7F-78312F827C30@newclarity.net> In-Reply-To: Date: Mon, 17 May 2021 18:47:31 +0300 Message-ID: To: Guilliam Xavier Cc: Levi Morrison , Mike Schinkel , Hossein Baghayi , php internals Content-Type: multipart/alternative; boundary="000000000000e1c24e05c28883be" Subject: Re: [PHP-DEV] [RFC] Partial function application From: drealecs@gmail.com (=?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?=) --000000000000e1c24e05c28883be Content-Type: text/plain; charset="UTF-8" On Mon, May 17, 2021 at 6:36 PM Guilliam Xavier wrote: > On Mon, May 17, 2021 at 5:01 PM Levi Morrison > > wrote: > > > Joe Watkins has successfully worked out some bugs that also enable > > more powerful behavior. Thanks to Nikita and any others who worked > > with Joe on fixing these issues and reviewing the PR. > > > > The short of it is that re-ordering parameters when using named > > placeholders is now technically possible. We will send an update when > > the RFC and implementation are ready for re-review. > > > > That's great news! > > By the way, I forgot to add that another syntax might also be clearer when > binding a value to a named parameter, e.g.: > > ``` > function f($a, $b, $c, $d, $e) {/*...*/} > > /* We want to bind value 4 to param "d" */ > > // with current syntax: > $p = f(?, d: 4); /* or f(?, ?, ?, 4) */ > > // with another hypothetical syntax: > $p = *f(d: 4); > ``` > > Anyway, looking forward to your update =) > > Thanks, > > -- > Guilliam Xavier > Hey Guilliam, adding a special character like * or ? before the function name is not going to work. It might look good for *f() but it has the same issues as casting. You should be able to have with the current version a code like $actionGenerator->getDriveAction()('home', ?) You can't really put the * or ? before the function name here. Maybe having it just before the parenthesis would work. Regards, Alex --000000000000e1c24e05c28883be--