Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114511 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 58876 invoked from network); 18 May 2021 04:04:56 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 18 May 2021 04:04:56 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 35FCC1804CC for ; Mon, 17 May 2021 21:14:22 -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-io1-f41.google.com (mail-io1-f41.google.com [209.85.166.41]) (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 21:14:21 -0700 (PDT) Received: by mail-io1-f41.google.com with SMTP id z24so8085496ioi.3 for ; Mon, 17 May 2021 21:14:21 -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:content-transfer-encoding; bh=QxP1RLjZY/2Xlb8RWE/GA5Z0AW2zFB99Inum48uv3UM=; b=OwMrEISHqhtOwA5WHpsdGON4Kea2+Ja/T/cHG2FdjCSiyH+IbhSw+DMAbLsNPMwa7l B9Fxxby6a07Dhmj0JbC5FSQwHyOfIv9djdDuPkUpUsab1ffb2M90TwTwtU8F5yYsJJvk ISvlyIk0Tq9exJp7G+uL4ETP0ubXrjd5VSr6H9V/ebza6AS8z/SkafjRAcyzRLy2wjbf 6sJ+NBXKMerH2gy7JYUpKnwJkeolovQ137MShXVuI4EdjTA0LwrDSQlyzIL+L84Kn2VS kmlQazpar3qO/s8WrPOVRJZ4qZp2HrIDALMOaQiuGWMsDGxcNSiBtvxDlqAdaxlN9ERs CCPA== 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:content-transfer-encoding; bh=QxP1RLjZY/2Xlb8RWE/GA5Z0AW2zFB99Inum48uv3UM=; b=SVpsCbgEifyaDrwIUsUPSK9AZHcj8b0nbjI2L5hGc9zJsld5Nb66q6lEqgfZDXPGtd DX9/Dr+Zf22SVDyHo8COsROv3hDgd/UTS3utEeXxC64e0uc34d+p6IvHwVC6JCKs0KSX X6Lt1XqZEQqmD36FuIylxVPvuug+LBSovS3ICbKFZ0qkzjw2tVwFjuJWIhEgiQQrD40v 5gdlv0p56AX01cGpPs0ltOOinuPJWrGLapNr6+Z2t8K2ufG5V5Iw1VGTEoZN8t6wKvOJ mzNpuYW2GVUml++NQpU2zwkrrEaxLxavsV8h+EDMDdJ1jyjOiG9vwOQZGT6TyE/b77Hf zhJw== X-Gm-Message-State: AOAM532EyjvXBJ6f6lEV4PNv6kMEUTHyD97k0nzC1DxivjtWJ3GFoAMw lVqrdm9YFzxT6JYgDzTZX9IXiXLfH0SodOBKoQ== X-Google-Smtp-Source: ABdhPJzAPWU3laVM/6woxN5+mJ5BwcfSM5AidCaUgjZzdOkxLVLgCKudlVZOi5Rongeo8Ge2TzcI6wmrtmJnV/bGqjU= X-Received: by 2002:a02:cac6:: with SMTP id f6mr3480942jap.142.1621311260909; Mon, 17 May 2021 21:14:20 -0700 (PDT) MIME-Version: 1.0 References: <1565EB81-57B7-49B0-A47C-342E0088A432@trowski.com> <532D1413-52FF-4403-A20B-BBDB51163C85@trowski.com> In-Reply-To: <532D1413-52FF-4403-A20B-BBDB51163C85@trowski.com> Date: Mon, 17 May 2021 21:14:08 -0700 Message-ID: To: Aaron Piotrowski Cc: Mark Randall , internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Partial function application From: paul.crovella@gmail.com (Paul Crovella) On Fri, May 14, 2021 at 4:44 PM Aaron Piotrowski wrote: > > My issue is the dual-meaning of ? in the current proposal. In `foo(?, 42)= `, the ? represents a single argument, but adding a trailing ? (such as in = `foo(?, 42, ?)`) represents any number of arguments. Would it perhaps make = sense to make superfluous ? markers an error? > > foo(?); // Fine, needed to define a partial with no bound args. > foo(?, 42); // Ok, binds second arg. > foo(?, ?, 42); // Ok, binds third arg. > foo(?, 42, ?); // Error, unnecessary placeholder. > foo(?, ?); // Error, unnecessary placeholder. > > The intention here is to keep the syntax unambiguous. > > foo(?) =3D=3D foo(?, ?) =3D=3D foo(?, ?, ?) and so forth is not going to = be obvious to everyone, so why allow meaningless and misleading syntax. > > Cheers, > Aaron Piotrowski > While it's my preference not to use superfluous placeholders they do no real harm and I do not feel comfortable imposing this preference on others.