Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119688 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 49019 invoked from network); 13 Mar 2023 20:37:10 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Mar 2023 20:37:10 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A5F851804F7 for ; Mon, 13 Mar 2023 13:37:05 -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=0.8 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,MISSING_HEADERS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 13 Mar 2023 13:37:05 -0700 (PDT) Received: by mail-wm1-f50.google.com with SMTP id k25-20020a7bc419000000b003ed23114fa7so3082006wmi.4 for ; Mon, 13 Mar 2023 13:37:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678739824; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:cc:from:date:from:to:cc:subject:date :message-id:reply-to; bh=cfVbm+pJA+Lgu4xCF18FRQ9TKmacxQbQTtiKNqVKOSA=; b=KYe6i7mnXmNtW8twZCS3rX83c6s8KNxX4S7x9/43T48jA9HslGN8QF8qB9Fd5GJa/9 FQECojW+iL/7DyTrCaKSWOTTRIfX1deh7/Tdbp273tggwYazzJ/EPgmTLE9Ga+0Toyh9 gM6VffdC2/peMx6a9+MhP3GiwIqfG6qdrkwHzu5ek9cD5Cfdxth4hU7lLWnLjFqE6nks e5yw++MHjHT3h95EbE1rfuV3BVI6JZaJrb8ibXlgOi6R5JmYXtnLngD1k5yU/T0JwAf2 WLwUeWi0sSyJSH+MTe52rk+re9BqtabyL+MXwpQBwdDQC/WZSJdZ1Yhp1RQVIN9gKsny nfBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678739824; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:cc:from:date:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=cfVbm+pJA+Lgu4xCF18FRQ9TKmacxQbQTtiKNqVKOSA=; b=6kIwHzrSn3+/0i/B1WJQdaCNSDJ3062IVwFbozLyot3hXVhKiEP5H1GfON3UJc2vt0 5UE/uVDaLiOkKSoya4Ysy3GV5JNCJAKiPEaIwyuoTjJxkvNxOLQYPdkxBtAIwX/DfcmH pWs4Y8v3usvwdBplWBoZASwD4bTsqz4ORFAJZ0xbE1PqJBbWf1jo3MLHRyS4WwujBT2h qsPnRgHLc7xP0pI7icTO71VL6fys6rvwMcTZj0g7aY2nJ5ft/vQO6Wlf9FkzieB8W2iJ AWnt5rOYwa8XJM6zAF4E2GGQQ3CB/J9Ad156xPdMndeEgdf5cyIXMX3sqkGn5Xy8ZRlO ZbEQ== X-Gm-Message-State: AO0yUKVOwGT6/NxaU5gC4SOoD91y2z+N77oOhDrbDadUaDDNcyJHt8Lu 1UGHxjigtAIyaOhmARq6Es4Rz8T9SwQ= X-Google-Smtp-Source: AK7set+1zi+Q+UMpW2w46BcNFIv5gXvmgP5Y8IInK3F/3fTZgN7GTFIelvYGE0HYBJn05kaYUMb+sg== X-Received: by 2002:a05:600c:35cd:b0:3eb:42ab:7b5 with SMTP id r13-20020a05600c35cd00b003eb42ab07b5mr12523518wmq.1.1678739823794; Mon, 13 Mar 2023 13:37:03 -0700 (PDT) Received: from [127.0.0.1] (cpc83311-brig21-2-0-cust191.3-3.cable.virginm.net. [86.20.40.192]) by smtp.gmail.com with ESMTPSA id h17-20020a05600c28d100b003eb192787bfsm753237wmd.25.2023.03.13.13.37.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Mar 2023 13:37:03 -0700 (PDT) Date: Mon, 13 Mar 2023 20:36:59 +0000 CC: PHP Internals User-Agent: K-9 Mail for Android In-Reply-To: References: <9975B833-EE24-4ED7-B28E-841B92988BA0@cschneid.com> Message-ID: <1A2CE63B-ECCA-403D-83AC-B1E26279323C@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] First-class callable partial application From: rowan.collins@gmail.com (Rowan Tommins) On 13 March 2023 18:44:48 GMT, Robert Landers wrote: >My approach was more of an iterative one=2E > >1=2E Get left-right done so that > >$x =3D something($left, $right, =2E=2E=2E); > >would be allowed, but not > >$x =3D something($left, =2E=2E=2E, $right); > >This would bring some immediate benefits, as initially proposed=2E There are three problems I see with that: 1) The choice of syntax for the first version immediately limits the optio= ns for later additions, so you still need to discuss them=2E (IIRC, the pro= posal that went to vote had separate ? and =2E=2E=2E tokens, but a number o= f different variations were experimented with=2E) 2) Most of the goals I mentioned above are not about the syntax, and are n= o easier for left-to-right - for instance, copying the type information for= use in reflection and error messages=2E 3) Unlike purely or primarily functional languages, PHP's standard library= is not at all designed with parameter orders that lend themselves to left-= to-right application=2E I gave array_filter as an example, because it's exa= ctly the kind of function people will want to use PFA for, but wouldn't be = able to with left-to-right only=2E I don't want to put you off exploring this idea, though, so feel free to t= ake this all with as many pinches of salt as you want=2E Regards, --=20 Rowan Tommins [IMSoP]