Re: [PHP-DEV] [RFC] Partial Function Application, take 2

2021-06-11 Thread Joe Watkins
There's a couple of typos in the RFC, which Larry will fix when he has time. There was also a typo in patch, and a fault in patch. All fixed. pending tests, 3v4l won't update until tomorrow. Cheers Joe On Fri, 11 Jun 2021 at 13:02, Guilliam Xavier wrote: > Sorry, me again :s I have tested th

Re: [PHP-DEV] [RFC] Partial Function Application, take 2

2021-06-11 Thread Guilliam Xavier
Sorry, me again :s I have tested the examples from https://wiki.php.net/rfc/partial_function_application on https://3v4l.org/#focus=rfc.partials and several of them currently give an error: - Ex 10: on the line `$c = stuff(?, ?, f: 3.5, ..., p: $point);` => Fatal error: Named arguments must come

Re: [PHP-DEV] [RFC] Partial Function Application, take 2

2021-06-10 Thread Jordi Boggiano
On 07/06/2021 21:50, Björn Larsson wrote: Den 2021-06-02 kl. 22:16, skrev Mike Schinkel: My only comment/request/suggestion is to consider Mark Randall's suggestion to use `...?` instead, for the reasons he mentioned in his email to the list: https://externals.io/message/114157#114666

Re: [PHP-DEV] [RFC] Partial Function Application, take 2

2021-06-10 Thread Guilliam Xavier
On Thu, Jun 10, 2021 at 7:32 PM Guilliam Xavier wrote: > > Since `$null?->whatever(1, 'a')` currently always returns null without > error, shouldn't `$null?->whatever(?, 'a')` return a closure (with a > signature built from the placeholders only) that will return null when > called (i.e. equival

Re: [PHP-DEV] [RFC] Partial Function Application, take 2

2021-06-10 Thread Dan Ackroyd
On Thu, 10 Jun 2021 at 18:32, Guilliam Xavier wrote: > Since `$null?->whatever(1, 'a')` currently always > returns null without error, shouldn't `$null?->whatever(?, 'a')` return a > closure (with a signature built from the placeholders only) that will > return null when called (i.e. equivalent t

Re: [PHP-DEV] [RFC] Partial Function Application, take 2

2021-06-10 Thread Guilliam Xavier
On Thu, Jun 10, 2021 at 4:34 PM Larry Garfield wrote: > On Thu, Jun 10, 2021, at 3:17 AM, Guilliam Xavier wrote: > > On Wed, Jun 2, 2021 at 7:47 PM Larry Garfield > > wrote: > > > > > https://wiki.php.net/rfc/partial_function_application > > > > for `$null === null`, is `$c = $null->bar(?);` / `

Re: [PHP-DEV] [RFC] Partial Function Application, take 2

2021-06-10 Thread Larry Garfield
On Thu, Jun 10, 2021, at 3:17 AM, Guilliam Xavier wrote: > On Wed, Jun 2, 2021 at 7:47 PM Larry Garfield > wrote: > > > Hi folks. After much off-list discussion, iteration, and consideration, > > we have a new draft of PFA ready for review. > > > > The URL is the same: > > > > https://wiki.php.n

Re: [PHP-DEV] [RFC] Partial Function Application, take 2

2021-06-10 Thread Guilliam Xavier
On Wed, Jun 2, 2021 at 7:47 PM Larry Garfield wrote: > Hi folks. After much off-list discussion, iteration, and consideration, > we have a new draft of PFA ready for review. > > The URL is the same: > > https://wiki.php.net/rfc/partial_function_application > Hi, thanks all for the reworks! I j

Re: [PHP-DEV] [RFC] Partial Function Application, take 2

2021-06-07 Thread Björn Larsson
Den 2021-06-02 kl. 22:16, skrev Mike Schinkel: On Jun 2, 2021, at 1:45 PM, Larry Garfield wrote: Hi folks. After much off-list discussion, iteration, and consideration, we have a new draft of PFA ready for review. The URL is the same: https://wiki.php.net/rfc/partial_function_application

Re: [PHP-DEV] [RFC] Partial Function Application, take 2

2021-06-02 Thread Mike Schinkel
> On Jun 2, 2021, at 1:45 PM, Larry Garfield wrote: > > Hi folks. After much off-list discussion, iteration, and consideration, we > have a new draft of PFA ready for review. > > The URL is the same: > > https://wiki.php.net/rfc/partial_function_application Really excellent work, all! > It'

[PHP-DEV] [RFC] Partial Function Application, take 2

2021-06-02 Thread Larry Garfield
Hi folks. After much off-list discussion, iteration, and consideration, we have a new draft of PFA ready for review. The URL is the same: https://wiki.php.net/rfc/partial_function_application It's a bit long because we wanted to be as precise as possible. However, in short: * Partial applic

Re: [PHP-DEV] [RFC] Partial function application

2021-05-18 Thread David Gebler
On Tue, May 18, 2021 at 11:02 PM Levi Morrison wrote: > Some of the RFC authors have been discussing this a lot based on > feedback. In a [previous message][1] I said we would message the list > when it's ready for re-review. It's still not ready, but we seem to be > driving towards consensus. >

Re: [PHP-DEV] [RFC] Partial function application

2021-05-18 Thread Levi Morrison via internals
> I don't know what the answer is here, I'm reading through the entire thread > and RFC again and trying to better formulate in my mind how I'd [like to] > reason about this in terms of syntax. But the more I think about it, the > more I realise much as I loved the idea when I first read the RFC, n

Re: [PHP-DEV] [RFC] Partial function application

2021-05-18 Thread David Gebler
On Tue, May 18, 2021 at 9:51 PM Rowan Tommins wrote: > Hi David, > > Did you see my message yesterday about the two mental models of the > feature? https://externals.io/message/114157#114492 > > Your expectation there is in line with the "start with an empty closure > and add things" model; the b

Re: [PHP-DEV] [RFC] Partial function application

2021-05-18 Thread Rowan Tommins
Hi David, On 18/05/2021 20:56, David Gebler wrote: function foo(int $a, int $b, int ...$p) { ... } $partial = foo(?, 10); $partial(5, 15, 25); Intuitively, because the existing convention is extra unused parameters in user defined functions are silently ignored, I think I would expect the abov

Re: [PHP-DEV] [RFC] Partial function application

2021-05-18 Thread David Gebler
On Tue, May 18, 2021 at 2:45 PM Larry Garfield wrote: > User-space functions have always accepted more arguments than they're > defined with. They just get dropped off the end silently, unless you use > func_get_args() or variadics. While I know not everyone likes that > "feature", it means tha

Re: [PHP-DEV] [RFC] Partial function application

2021-05-18 Thread Larry Garfield
On Mon, May 17, 2021, at 11:14 PM, Paul Crovella wrote: > 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, ?)`) r

Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread 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

Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread Alexandru Pătrănescu
On Mon, May 17, 2021, 19:53 Guilliam Xavier wrote: > > > On Mon, May 17, 2021 at 5:47 PM Alexandru Pătrănescu > wrote: > >> >> On Mon, May 17, 2021 at 6:36 PM Guilliam Xavier < >> guilliam.xav...@gmail.com> wrote: >> >>> On Mon, May 17, 2021 at 5:01 PM Levi Morrison < >>> levi.morri...@datadoghq

Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread Guilliam Xavier
On Mon, May 17, 2021 at 5:47 PM Alexandru Pătrănescu wrote: > > On Mon, May 17, 2021 at 6:36 PM Guilliam Xavier > wrote: > >> On Mon, May 17, 2021 at 5:01 PM Levi Morrison < >> levi.morri...@datadoghq.com> >> wrote: >> >> > Joe Watkins has successfully worked out some bugs that also enable >> >

Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread Alexandru Pătrănescu
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 an

Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread Guilliam Xavier
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

Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread Guilliam Xavier
On Mon, May 17, 2021 at 5:16 PM Mike Schinkel wrote: > > > On May 17, 2021, at 10:50 AM, Guilliam Xavier > wrote: > > > > On Mon, May 17, 2021 at 6:58 AM Mike Schinkel wrote: > >> > >> > Well, I was thinking that by changing the proposed syntax we could >> achieve >> > what is proposed and a li

Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread Alexandru Pătrănescu
On Mon, May 17, 2021 at 6:16 PM Mike Schinkel wrote: > > > > On May 17, 2021, at 10:50 AM, Guilliam Xavier > wrote: > > > > > > > > On Mon, May 17, 2021 at 6:58 AM Mike Schinkel > wrote: > > > > Casting is another interesting approach that does feel more consistent >

Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread Mike Schinkel
> On May 17, 2021, at 10:50 AM, Guilliam Xavier > wrote: > > > > On Mon, May 17, 2021 at 6:58 AM Mike Schinkel > wrote: > > > > Well, I was thinking that by changing the proposed syntax we could achieve > > what is proposed and a little bit more. > > Also we wou

Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread Levi Morrison via internals
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 w

Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread Guilliam Xavier
On Mon, May 17, 2021 at 6:58 AM Mike Schinkel wrote: > > > On May 16, 2021, at 10:43 PM, Hossein Baghayi > wrote: > > > > On Sat, 15 May 2021 at 09:03, Hossein Baghayi > > > wrote: > > > >> Providing ? as a means of placeholder for some arguments and ignoring > the > >> rest could complicate th

Re: [PHP-DEV] [RFC] Partial function application

2021-05-17 Thread Rowan Tommins
On 25/04/2021 20:25, Larry Garfield wrote: Greetings, Internalians! I would like to offer for your consideration another RFC, specifically syntax for partial function application. https://wiki.php.net/rfc/partial_function_application During off-list discussions, it's become clear that there

Re: [PHP-DEV] [RFC] Partial function application

2021-05-16 Thread Mike Schinkel
> On May 16, 2021, at 10:43 PM, Hossein Baghayi > wrote: > > On Sat, 15 May 2021 at 09:03, Hossein Baghayi > wrote: > >> Providing ? as a means of placeholder for some arguments and ignoring the >> rest could complicate the readability in my opinion. >> Maybe we should move (?) out of the ar

Re: [PHP-DEV] [RFC] Partial function application

2021-05-16 Thread Hossein Baghayi
On Sat, 15 May 2021 at 09:03, Hossein Baghayi wrote: > Providing ? as a means of placeholder for some arguments and ignoring the > rest could complicate the readability in my opinion. > Maybe we should move (?) out of the arguments list as a means of creating > a partial. > > What I realized is t

Re: [PHP-DEV] [RFC] Partial function application

2021-05-16 Thread Mike Schinkel
> On May 15, 2021, at 4:20 AM, Rowan Tommins wrote: > > On 15 May 2021 00:09:41 BST, Paul Crovella wrote: >> I think this highlights where the misunderstanding of this feature is. > > > I think the fact that there is so much confusion highlights why it is worth > considering different desig

Re: [PHP-DEV] [RFC] Partial function application

2021-05-15 Thread Rowan Tommins
On 15 May 2021 00:09:41 BST, Paul Crovella wrote: >I think this highlights where the misunderstanding of this feature is. I think the fact that there is so much confusion highlights why it is worth considering different designs. >Partial application is about binding arguments. ? isn't an argu

Re: [PHP-DEV] [RFC] Partial function application

2021-05-14 Thread Hossein Baghayi
> Requiring additional trailing argument placeholders or adding an > additional token `...?` unnecessarily complicates things, burdens the > user, and only serves to further promote misunderstanding. > > Providing ? as a means of placeholder for some arguments and ignoring the rest could complicate

Re: [PHP-DEV] [RFC] Partial function application

2021-05-14 Thread Aaron Piotrowski
On May 14, 2021, at 7:36 PM, Larry Garfield wrote: > > On Fri, May 14, 2021, at 7:20 PM, Aaron Piotrowski wrote: >> >>> On May 14, 2021, at 7:00 PM, Larry Garfield wrote: >>> >>> Is that actually going to come up? Given that PHP functions (at least >>> user-space ones) accept extra trailing

Re: [PHP-DEV] [RFC] Partial function application

2021-05-14 Thread Larry Garfield
On Fri, May 14, 2021, at 7:20 PM, Aaron Piotrowski wrote: > > > On May 14, 2021, at 7:00 PM, Larry Garfield wrote: > > > > Is that actually going to come up? Given that PHP functions (at least > > user-space ones) accept extra trailing arguments and just let them fall > > off, I would *expect

Re: [PHP-DEV] [RFC] Partial function application

2021-05-14 Thread Aaron Piotrowski
> On May 14, 2021, at 7:00 PM, Larry Garfield wrote: > > Is that actually going to come up? Given that PHP functions (at least > user-space ones) accept extra trailing arguments and just let them fall off, > I would *expect* a closure that way to do the same. Named arguments continue > tha

Re: [PHP-DEV] [RFC] Partial function application

2021-05-14 Thread Mark Randall
On 15/05/2021 01:00, Larry Garfield wrote: I can't speak for the others, but I could tolerate making "more than one extra ? beyond the end of the parameter list is an error", potentially, as at that point they're redundant. But if a function has, say, 4 params, then fourParams(1, 3, ?) is a conve

Re: [PHP-DEV] [RFC] Partial function application

2021-05-14 Thread Larry Garfield
Mark Randall: > Based on discussions in R11 there seems to be broad agreement that ? > should represent a single argument, and ...? should represent everything > else (including no arguments). This is incorrect. There were a few people arguing for that, but there was far from a consensus on t

Re: [PHP-DEV] [RFC] Partial function application

2021-05-14 Thread Aaron Piotrowski
> On May 14, 2021, at 6:09 PM, Paul Crovella wrote: > > On Fri, May 14, 2021 at 2:49 PM Aaron Piotrowski wrote: >> >> Consider `function foo(int $x, int $y, int $z) {}` with a partial defined as >> `$partial = foo(?, 42)`. >> >> If the partial is called as `$partial(73, 8)`, should 8 be for

Re: [PHP-DEV] [RFC] Partial function application

2021-05-14 Thread Paul Crovella
On Fri, May 14, 2021 at 2:49 PM Aaron Piotrowski wrote: > > Consider `function foo(int $x, int $y, int $z) {}` with a partial defined as > `$partial = foo(?, 42)`. > > If the partial is called as `$partial(73, 8)`, should 8 be forwarded to `$z` > or should the call error as providing too few arg

Re: [PHP-DEV] [RFC] Partial function application

2021-05-14 Thread Mark Randall
On 14/05/2021 22:48, Aaron Piotrowski wrote: I think it’s reasonable to allow passing more arguments to a partial since user-defined functions and closures allow this without error. But only userland functions, a relic from when func_get_args was the only way to handle varaible numbers of arg

Re: [PHP-DEV] [RFC] Partial function application

2021-05-14 Thread Aaron Piotrowski
> On May 14, 2021, at 4:18 PM, Mark Randall wrote: > > > Passing more arguments than the partial defines would result in an argument > count error. > I think it’s reasonable to allow passing more arguments to a partial since user-defined functions and closures allow this without error. Wh

Re: [PHP-DEV] [RFC] Partial function application

2021-05-14 Thread Larry Garfield
On Thu, May 13, 2021, at 3:30 PM, Sara Golemon wrote: > On Thu, May 13, 2021 at 2:31 PM Andreas Hennings > wrote: > > > 1. Serializing: > > But outside of the above cases it should be technically possible, or not? > > > > > I suspect that the limitations you cite make any kind of general > serial

Re: [PHP-DEV] [RFC] Partial function application

2021-05-13 Thread Levi Morrison via internals
On Thu, May 13, 2021 at 2:31 PM Sara Golemon wrote: > > On Thu, May 13, 2021 at 2:31 PM Andreas Hennings > wrote: > > > 1. Serializing: > > But outside of the above cases it should be technically possible, or not? > > > > > I suspect that the limitations you cite make any kind of general > serial

Re: [PHP-DEV] [RFC] Partial function application

2021-05-13 Thread Sara Golemon
On Thu, May 13, 2021 at 2:31 PM Andreas Hennings wrote: > 1. Serializing: > But outside of the above cases it should be technically possible, or not? > > I suspect that the limitations you cite make any kind of general serializing both unreliable and impractical. I wouldn't plan on meaningful se

Re: [PHP-DEV] [RFC] Partial function application

2021-05-13 Thread Bruce Weirdan
On Thu, May 13, 2021 at 10:43 PM Paul Crovella wrote: > Regarding "Comparison to other languages" Speaking of that section, there's one minor nitpick. Currently it says Perl 6 was renamed to Racket, but it was actually renamed to Raku. Racket is an unrelated, Lisp-like language. -- Best reg

Re: [PHP-DEV] [RFC] Partial function application

2021-05-13 Thread Paul Crovella
On Sun, Apr 25, 2021 at 12:27 PM Larry Garfield wrote: > > Greetings, Internalians! > > I would like to offer for your consideration another RFC, specifically syntax > for partial function application. > > https://wiki.php.net/rfc/partial_function_application > > It includes an implementation by

Re: [PHP-DEV] [RFC] Partial function application

2021-05-13 Thread Andreas Hennings
On Sun, 25 Apr 2021 at 21:27, Larry Garfield wrote: > > Greetings, Internalians! > > I would like to offer for your consideration another RFC, specifically syntax > for partial function application. > > https://wiki.php.net/rfc/partial_function_application > > It includes an implementation by Joe

Re: [PHP-DEV] [RFC] Partial function application

2021-05-13 Thread someniatko
> The GitHub PR supports this, and there is even a comment there saying > we should show this in the RFC. We'll get that updated. Thank you for the quick reaction and for your work! -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Partial function application

2021-05-13 Thread Nicolas Grekas
Le jeu. 13 mai 2021 à 19:00, Larry Garfield a écrit : > On Tue, May 11, 2021, at 10:38 AM, Larry Garfield wrote: > > On Sun, Apr 25, 2021, at 2:25 PM, Larry Garfield wrote: > > > Greetings, Internalians! > > > > > > I would like to offer for your consideration another RFC, specifically > > > synt

Re: [PHP-DEV] [RFC] Partial function application

2021-05-13 Thread Larry Garfield
On Tue, May 11, 2021, at 10:38 AM, Larry Garfield wrote: > On Sun, Apr 25, 2021, at 2:25 PM, Larry Garfield wrote: > > Greetings, Internalians! > > > > I would like to offer for your consideration another RFC, specifically > > syntax for partial function application. > > > > https://wiki.php.net

Re: [PHP-DEV] [RFC] Partial function application

2021-05-13 Thread Levi Morrison via internals
On Thu, May 13, 2021 at 7:44 AM Levi Morrison wrote: > > On Thu, May 13, 2021 at 2:45 AM someniatko wrote: > > > > > Greetings, Internalians! > > > > > > I would like to offer for your consideration another RFC, specifically > > > syntax for partial function application. > > > > > > https://wiki

Re: [PHP-DEV] [RFC] Partial function application

2021-05-13 Thread Levi Morrison via internals
On Thu, May 13, 2021 at 2:45 AM someniatko wrote: > > > Greetings, Internalians! > > > > I would like to offer for your consideration another RFC, specifically > > syntax for partial function application. > > > > https://wiki.php.net/rfc/partial_function_application > > Thank you again for one mo

Re: [PHP-DEV] [RFC] Partial function application

2021-05-13 Thread Björn Larsson
Den 2021-05-11 kl. 17:38, skrev Larry Garfield: On Sun, Apr 25, 2021, at 2:25 PM, Larry Garfield wrote: Greetings, Internalians! I would like to offer for your consideration another RFC, specifically syntax for partial function application. https://wiki.php.net/rfc/partial_function_application

Re: [PHP-DEV] [RFC] Partial function application

2021-05-13 Thread someniatko
> Greetings, Internalians! > > I would like to offer for your consideration another RFC, specifically syntax > for partial function application. > > https://wiki.php.net/rfc/partial_function_application Thank you again for one more wonderful language change! I am sure this is a huge step into the

Re: [PHP-DEV] [RFC] Partial function application

2021-05-12 Thread Nicolas Grekas
> > > > > This makes me wonder: can we create a partial programmatically? > Wouldn't > > > > that be needed for some use cases? > > > > Partial::createFromCallable($callable, the-args)? > > > > > > > > Nicolas > > > > > > I cannot think of a use case where that would be needed. Since you can > > >

Re: [PHP-DEV] [RFC] Partial function application

2021-05-12 Thread Larry Garfield
On Wed, May 12, 2021, at 4:51 AM, Nicolas Grekas wrote: > > > This makes me wonder: can we create a partial programmatically? Wouldn't > > > that be needed for some use cases? > > > Partial::createFromCallable($callable, the-args)? > > > > > > Nicolas > > > > I cannot think of a use case where tha

Re: [PHP-DEV] [RFC] Partial function application

2021-05-12 Thread Nicolas Grekas
> > > > BTW, ideally, partial functions should not increase the depth of the > > > > stacktrace at all. Do they? > > > > > > > > Nicolas > > > > > > They currently do, since they work by creating a Closure-esque object > > > called Partial with an __invoke() method. However, if you partial the > s

Re: [PHP-DEV] [RFC] Partial function application

2021-05-11 Thread Alexandru Pătrănescu
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

Re: [PHP-DEV] [RFC] Partial function application

2021-05-11 Thread Larry Garfield
On Tue, May 11, 2021, at 1:32 PM, Nicolas Grekas wrote: > > > BTW, ideally, partial functions should not increase the depth of the > > > stacktrace at all. Do they? > > > > > > Nicolas > > > > They currently do, since they work by creating a Closure-esque object > > called Partial with an __invoke

Re: [PHP-DEV] [RFC] Partial function application

2021-05-11 Thread Nicolas Grekas
> > > On Sun, Apr 25, 2021, at 2:25 PM, Larry Garfield wrote: > > > > Greetings, Internalians! > > > > > > > > I would like to offer for your consideration another RFC, > specifically > > > > syntax for partial function application. > > > > > > > > https://wiki.php.net/rfc/partial_function_applicat

Re: [PHP-DEV] [RFC] Partial function application

2021-05-11 Thread Larry Garfield
On Tue, May 11, 2021, at 11:57 AM, Nicolas Grekas wrote: > > On Sun, Apr 25, 2021, at 2:25 PM, Larry Garfield wrote: > > > Greetings, Internalians! > > > > > > I would like to offer for your consideration another RFC, specifically > > > syntax for partial function application. > > > > > > https://w

Re: [PHP-DEV] [RFC] Partial function application

2021-05-11 Thread David Gebler
On Tue, May 11, 2021 at 4:39 PM Larry Garfield wrote: > It looks like the conversation has died down, and it's been two weeks, so > pending any other notable feedback I'll open a vote on this RFC on Thursday > or Friday. > > --Larry Garfield > > > My only query / point of consideration is a very

Re: [PHP-DEV] [RFC] Partial function application

2021-05-11 Thread Nicolas Grekas
> On Sun, Apr 25, 2021, at 2:25 PM, Larry Garfield wrote: > > Greetings, Internalians! > > > > I would like to offer for your consideration another RFC, specifically > > syntax for partial function application. > > > > https://wiki.php.net/rfc/partial_function_application > > > > It includes an imp

Re: [PHP-DEV] [RFC] Partial function application

2021-05-11 Thread Larry Garfield
On Sun, Apr 25, 2021, at 2:25 PM, Larry Garfield wrote: > Greetings, Internalians! > > I would like to offer for your consideration another RFC, specifically > syntax for partial function application. > > https://wiki.php.net/rfc/partial_function_application > > It includes an implementation by

Re: [PHP-DEV] [RFC] Partial function application

2021-04-26 Thread Levi Morrison via internals
On Sun, Apr 25, 2021 at 1:51 PM Olle Härstedt wrote: > > 2021-04-25 21:25 GMT+02:00, Larry Garfield : > > Greetings, Internalians! > > > > I would like to offer for your consideration another RFC, specifically > > syntax for partial function application. > > > > https://wiki.php.net/rfc/partial_fu

Re: [PHP-DEV] [RFC] Partial function application

2021-04-26 Thread Levi Morrison via internals
> If this is indeed the scenario, would it be worth adding a syntax to > indicate _all_ parameters can be placeholders? When a signature has > multiple arguments, `toString(?, ?, ?, ?)` could become `toString(...?)` or > maybe something like `toString(*)`? At the moment, there isn't any difference

Re: [PHP-DEV] [RFC] Partial function application

2021-04-26 Thread Lynn
On Sun, Apr 25, 2021 at 9:26 PM Larry Garfield wrote: > Greetings, Internalians! > > I would like to offer for your consideration another RFC, specifically > syntax for partial function application. > > https://wiki.php.net/rfc/partial_function_application > > It includes an implementation by Joe

Re: [PHP-DEV] [RFC] Partial function application

2021-04-26 Thread Olle Härstedt
2021-04-26 0:19 GMT+02:00, Larry Garfield : > On Sun, Apr 25, 2021, at 4:34 PM, Olle Härstedt wrote: > > >> By the way, for pipe operators to be really useful, it should probably >> be possible to combine with middleware. >> >> Olle > > Pipes are their own RFC I plan to bring back up after this one

Re: [PHP-DEV] [RFC] Partial function application

2021-04-25 Thread Larry Garfield
On Sun, Apr 25, 2021, at 4:34 PM, Olle Härstedt wrote: > By the way, for pipe operators to be really useful, it should probably > be possible to combine with middleware. > > Olle Pipes are their own RFC I plan to bring back up after this one gets closer to a vote or passes, as they complement

Re: [PHP-DEV] [RFC] Partial function application

2021-04-25 Thread Larry Garfield
On Sun, Apr 25, 2021, at 4:34 PM, Levi Morrison via internals wrote: > On Sun, Apr 25, 2021 at 3:08 PM Max Semenik wrote: > > > > On Sun, Apr 25, 2021 at 10:26 PM Larry Garfield > > wrote: > > > > > https://wiki.php.net/rfc/partial_function_application > > > > > > Amazing, I've wanted this for s

Re: [PHP-DEV] [RFC] Partial function application

2021-04-25 Thread Levi Morrison via internals
On Sun, Apr 25, 2021 at 3:08 PM Max Semenik wrote: > > On Sun, Apr 25, 2021 at 10:26 PM Larry Garfield > wrote: > > > https://wiki.php.net/rfc/partial_function_application > > > Amazing, I've wanted this for so long! Have you considered extending this > syntax to OOP, e.g. $obj->method(?) or Som

Re: [PHP-DEV] [RFC] Partial function application

2021-04-25 Thread Olle Härstedt
2021-04-25 21:07 GMT, Max Semenik : > On Sun, Apr 25, 2021 at 10:26 PM Larry Garfield > wrote: > >> https://wiki.php.net/rfc/partial_function_application > > > Amazing, I've wanted this for so long! Have you considered extending this > syntax to OOP, e.g. $obj->method(?) or SomeClass::staticMetho

Re: [PHP-DEV] [RFC] Partial function application

2021-04-25 Thread Olle Härstedt
2021-04-25 21:07 GMT, Max Semenik : > On Sun, Apr 25, 2021 at 10:26 PM Larry Garfield > wrote: > >> https://wiki.php.net/rfc/partial_function_application > > > Amazing, I've wanted this for so long! Have you considered extending this > syntax to OOP, e.g. $obj->method(?) or SomeClass::staticMetho

Re: [PHP-DEV] [RFC] Partial function application

2021-04-25 Thread Max Semenik
On Sun, Apr 25, 2021 at 10:26 PM Larry Garfield wrote: > https://wiki.php.net/rfc/partial_function_application Amazing, I've wanted this for so long! Have you considered extending this syntax to OOP, e.g. $obj->method(?) or SomeClass::staticMethod(?)? On Sun, Apr 25, 2021 at 10:51 PM Olle Här

Re: [PHP-DEV] [RFC] Partial function application

2021-04-25 Thread Olle Härstedt
2021-04-25 21:25 GMT+02:00, Larry Garfield : > Greetings, Internalians! > > I would like to offer for your consideration another RFC, specifically > syntax for partial function application. > > https://wiki.php.net/rfc/partial_function_application > > It includes an implementation by Joe Watkins th

[PHP-DEV] [RFC] Partial function application

2021-04-25 Thread Larry Garfield
Greetings, Internalians! I would like to offer for your consideration another RFC, specifically syntax for partial function application. https://wiki.php.net/rfc/partial_function_application It includes an implementation by Joe Watkins that is already about 95% complete. (There's some edge ca