Re: [PHP-DEV] [Vote] Partial Function Application

2021-07-01 Thread Alexandru Pătrănescu
On Thu, Jul 1, 2021 at 3:05 PM Hamza Ahmad wrote: > Hi all, > > While I was reading through the discussion, I found a question related > to the conflict of constant names and functions names. In other words, > `strlen` can be both a constant name and a function name. > This was stated before but

Re: [PHP-DEV] [Vote] Partial Function Application

2021-07-01 Thread Hamza Ahmad
Hi all, While I was reading through the discussion, I found a question related to the conflict of constant names and functions names. In other words, `strlen` can be both a constant name and a function name. Thus, in pipe RFC, it can go confusing whether it is a constant or a function name when ca

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-30 Thread Olle Härstedt
2021-06-30 19:10 GMT+02:00, Larry Garfield : > On Wed, Jun 30, 2021, at 8:59 AM, Olle Härstedt wrote: > >> > I've been pondering if a completely different approach with a prefix >> > symbol would be able to be less complex, and the simple answer is I >> > have absolutely no idea. But we are run

[PHP-DEV] [Vote] Partial Function Application

2021-06-30 Thread Olle Härstedt
Re: [PHP-DEV] [Vote] Partial Function Application To: php internals <mailto:internals@lists.php.net> On Tue, Jun 29, 2021, at 1:00 PM, Larry Garfield wrote: > On Tue, Jun 29, 2021, at 12:30 PM, Guilliam Xavier wrote: > > (Extracted from the "Pipe Operator, take 2" threa

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-30 Thread Larry Garfield
On Wed, Jun 30, 2021, at 8:59 AM, Olle Härstedt wrote: > > I've been pondering if a completely different approach with a prefix > > symbol would be able to be less complex, and the simple answer is I > > have absolutely no idea.  But we are running low on symbols... > > Ah, I found the tec

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-30 Thread Guilliam Xavier
On Tue, Jun 29, 2021 at 10:32 PM Levi Morrison via internals < internals@lists.php.net> wrote: > On Tue, Jun 29, 2021 at 12:05 PM Larry Garfield > wrote: > > > > On Tue, Jun 29, 2021, at 1:00 PM, Larry Garfield wrote: > > > On Tue, Jun 29, 2021, at 12:30 PM, Guilliam Xavier wrote: > > > > (Extrac

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-29 Thread Levi Morrison via internals
On Tue, Jun 29, 2021 at 12:05 PM Larry Garfield wrote: > > On Tue, Jun 29, 2021, at 1:00 PM, Larry Garfield wrote: > > On Tue, Jun 29, 2021, at 12:30 PM, Guilliam Xavier wrote: > > > (Extracted from the "Pipe Operator, take 2" thread) > > > > > > On Tue, Jun 29, 2021 at 12:54 AM Larry Garfield >

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-29 Thread Larry Garfield
On Tue, Jun 29, 2021, at 1:00 PM, Larry Garfield wrote: > On Tue, Jun 29, 2021, at 12:30 PM, Guilliam Xavier wrote: > > (Extracted from the "Pipe Operator, take 2" thread) > > > > On Tue, Jun 29, 2021 at 12:54 AM Larry Garfield > > wrote: > > > > > On Mon, Jun 28, 2021, at 5:30 PM, Olle Härstedt

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-29 Thread Larry Garfield
On Tue, Jun 29, 2021, at 12:30 PM, Guilliam Xavier wrote: > (Extracted from the "Pipe Operator, take 2" thread) > > On Tue, Jun 29, 2021 at 12:54 AM Larry Garfield > wrote: > > > On Mon, Jun 28, 2021, at 5:30 PM, Olle Härstedt wrote: > > > > > Would a slimmed down version have more support? How

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-29 Thread Guilliam Xavier
On Tue, Jun 29, 2021 at 11:04 AM Côme Chilliet < come.chill...@fusiondirectory.org> wrote: > Le Thu, 17 Jun 2021 08:30:43 -0500, > "Larry Garfield" a écrit : > > > > The ? character was chosen for the placeholder largely because it was > > > > unambiguous and easy to implement. Prior, similar RFC

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-29 Thread Guilliam Xavier
(Extracted from the "Pipe Operator, take 2" thread) On Tue, Jun 29, 2021 at 12:54 AM Larry Garfield wrote: > On Mon, Jun 28, 2021, at 5:30 PM, Olle Härstedt wrote: > > > Would a slimmed down version have more support? How about removing the > > variadic operator, and let the user manually add th

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-29 Thread Côme Chilliet
Le Thu, 17 Jun 2021 08:30:43 -0500, "Larry Garfield" a écrit : > > > The ? character was chosen for the placeholder largely because it was > > > unambiguous and easy to implement. Prior, similar RFCs (such as the > > > original Pipe Operator proposal from several years ago) used the $$ > > > (lovi

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-28 Thread Björn Larsson via internals
Den 2021-06-28 kl. 16:52, skrev Nikita Popov: On Mon, Jun 21, 2021 at 4:26 PM Björn Larsson mailto:bjorn.x.lars...@telia.com>> wrote: Would you look on this feature in a different light if the above concerns about strict types and nullsafe calls could be clarified / solved? Or is it

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-28 Thread Olle Härstedt
On Mon, 28 Jun 2021, 18:49 Levi Morrison, wrote: > On Mon, Jun 28, 2021 at 10:32 AM Olle Härstedt > wrote: > > > > On Thu, 24 Jun 2021, 18:02 Larry Garfield, > wrote: > > > > > On Wed, Jun 16, 2021, at 11:16 AM, Larry Garfield wrote: > > > > Hi folks. The vote for the Partial Function Applicat

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-28 Thread Levi Morrison via internals
On Mon, Jun 28, 2021 at 10:32 AM Olle Härstedt wrote: > > On Thu, 24 Jun 2021, 18:02 Larry Garfield, wrote: > > > On Wed, Jun 16, 2021, at 11:16 AM, Larry Garfield wrote: > > > Hi folks. The vote for the Partial Function Application RFC is now > > > open, and will run until 30 June. > > > > > >

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-28 Thread Olle Härstedt
On Thu, 24 Jun 2021, 18:02 Larry Garfield, wrote: > On Wed, Jun 16, 2021, at 11:16 AM, Larry Garfield wrote: > > Hi folks. The vote for the Partial Function Application RFC is now > > open, and will run until 30 June. > > > > https://wiki.php.net/rfc/partial_function_application > > > > Of parti

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-28 Thread Peter Bowyer
On Mon, 28 Jun 2021 at 17:08, Larry Garfield wrote: > Javascript doesn't have it natively, but there are 3rd party libraries > that try to do it. > There is a proposal to add it to the language: https://github.com/tc39/proposal-partial-application Peter

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-28 Thread Larry Garfield
On Mon, Jun 28, 2021, at 9:52 AM, Nikita Popov wrote: > These were just some notes on implementation details, they don't really > impact my overall opinion of the RFC. I should also say that I'm not > strongly opposed here, I'm just not convinced this is worthwhile :) The > complexity of the featu

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-28 Thread Nikita Popov
On Mon, Jun 21, 2021 at 4:26 PM Björn Larsson wrote: > Den 2021-06-18 kl. 16:08, skrev Nikita Popov: > > On Wed, Jun 16, 2021 at 6:17 PM Larry Garfield > > wrote: > > > >> Hi folks. The vote for the Partial Function Application RFC is now > open, > >> and will run until 30 June. > >> > >> https

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-24 Thread Levi Morrison via internals
On Thu, Jun 24, 2021 at 11:12 AM Claude Pache wrote: > > > > > Le 24 juin 2021 à 18:02, Larry Garfield a écrit : > > > > On Wed, Jun 16, 2021, at 11:16 AM, Larry Garfield wrote: > >> Hi folks. The vote for the Partial Function Application RFC is now > >> open, and will run until 30 June. > >> >

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-24 Thread Claude Pache
> Le 24 juin 2021 à 18:02, Larry Garfield a écrit : > > On Wed, Jun 16, 2021, at 11:16 AM, Larry Garfield wrote: >> Hi folks. The vote for the Partial Function Application RFC is now >> open, and will run until 30 June. >> >> https://wiki.php.net/rfc/partial_function_application >> >> Of p

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-24 Thread Larry Garfield
On Wed, Jun 16, 2021, at 11:16 AM, Larry Garfield wrote: > Hi folks. The vote for the Partial Function Application RFC is now > open, and will run until 30 June. > > https://wiki.php.net/rfc/partial_function_application > > Of particular note, a few people had asked about using ...? instead of

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-23 Thread Peter Bowyer
On Wed, 16 Jun 2021 at 17:17, Larry Garfield wrote: > Hi folks. The vote for the Partial Function Application RFC is now open, > and will run until 30 June. > > https://wiki.php.net/rfc/partial_function_application > I like. People have either experienced the need for this or they haven't. Ask

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-21 Thread Björn Larsson via internals
Hi and thanks for the clarification! So if I get it right, by not addressing null safe calls and strict types now we can address it later when we know a little bit more, which btw is not the first time it's done. And the feature proposed requires a non trivial implementation. I think it shou

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-21 Thread Joe Watkins
I'd like to note a couple of things ... The behaviour of nullsafe and strict types being unspecified in the RFC would allow us to solve those problems later. The behaviour of strict types right now is objectively wrong, the partial takes strictness from the application site, so as Nikita already

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-21 Thread Björn Larsson via internals
Den 2021-06-18 kl. 16:08, skrev Nikita Popov: On Wed, Jun 16, 2021 at 6:17 PM Larry Garfield wrote: Hi folks. The vote for the Partial Function Application RFC is now open, and will run until 30 June. https://wiki.php.net/rfc/partial_function_application Of particular note, a few people had

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-20 Thread Levi Morrison via internals
> The thing is, new developers don't think *anything*. There's nothing > intrinsically more "natural" about procedural code vs functional code, or OOP > code, or whatever other paradigm. They're all artificial as far as the brain > is concerned. People who start off in an OOP language, and ar

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-19 Thread Larry Garfield
On Sat, Jun 19, 2021, at 3:22 AM, Mike Schinkel wrote: > Just to offer a counter perspective since the assertion was made that > partial functions would be hard for beginners. > > I believe beginners will have a harder time comprehending closures, and > especially short closures, than partial f

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-19 Thread Larry Garfield
On Sat, Jun 19, 2021, at 12:39 AM, Hamza Ahmad wrote: > HI Larry Garfield, > > Do you have a plan to further extend this rfc? I mean, what if one > could typecast place holders? Broadly speaking, what if one could > perform some operations, such as arithmetic, bitwise, and type cast as > said abov

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-19 Thread Mike Schinkel
> On Jun 18, 2021, at 7:41 PM, Benjamin Eberlei wrote: > > On Wed, Jun 16, 2021 at 6:17 PM Larry Garfield > wrote: > >> Hi folks. The vote for the Partial Function Application RFC is now open, >> and will run until 30 June. >> >> https://wiki.php.net/rfc/partial_function_application > > I wa

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-18 Thread Hamza Ahmad
HI Larry Garfield, Do you have a plan to further extend this rfc? I mean, what if one could typecast place holders? Broadly speaking, what if one could perform some operations, such as arithmetic, bitwise, and type cast as said above? `$foo = bar((type) ?);` `$foo = bar(? & 0xFF);` Best Hamza Ah

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-18 Thread Patrick ALLAERT
Le sam. 19 juin 2021 à 01:41, Benjamin Eberlei a écrit : > On Wed, Jun 16, 2021 at 6:17 PM Larry Garfield > wrote: > > > Hi folks. The vote for the Partial Function Application RFC is now open, > > and will run until 30 June. > > > > https://wiki.php.net/rfc/partial_function_application > > > >

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-18 Thread Benjamin Eberlei
On Wed, Jun 16, 2021 at 6:17 PM Larry Garfield wrote: > Hi folks. The vote for the Partial Function Application RFC is now open, > and will run until 30 June. > > https://wiki.php.net/rfc/partial_function_application > > Of particular note, a few people had asked about using ...? instead of ...

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-18 Thread Nikita Popov
On Wed, Jun 16, 2021 at 6:17 PM Larry Garfield wrote: > Hi folks. The vote for the Partial Function Application RFC is now open, > and will run until 30 June. > > https://wiki.php.net/rfc/partial_function_application > > Of particular note, a few people had asked about using ...? instead of ...

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-17 Thread Larry Garfield
On Thu, Jun 17, 2021, at 9:45 AM, Côme Chilliet wrote: > Le Thu, 17 Jun 2021 08:37:23 -0500, > "Larry Garfield" a écrit : > > > On Thu, Jun 17, 2021, at 2:54 AM, Côme Chilliet wrote: > > > > $c = stuff(...); > > > > $c = fn(int $i, string $s, float $f, Point $p, int $m = 0) > > > > => stuff($

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-17 Thread Côme Chilliet
Le Thu, 17 Jun 2021 08:37:23 -0500, "Larry Garfield" a écrit : > On Thu, Jun 17, 2021, at 2:54 AM, Côme Chilliet wrote: > > > $c = stuff(...); > > > $c = fn(int $i, string $s, float $f, Point $p, int $m = 0) > > > => stuff($i, $s, $f, $p, $m); > > > > > $c = stuff(1, 'hi', 3.4, $point, 5

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-17 Thread Larry Garfield
On Thu, Jun 17, 2021, at 2:54 AM, Côme Chilliet wrote: > Le Wed, 16 Jun 2021 11:16:28 -0500, > "Larry Garfield" a écrit : > > > Hi folks. The vote for the Partial Function Application RFC is now open, > > and > > will run until 30 June. > > > > https://wiki.php.net/rfc/partial_function_applica

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-17 Thread Larry Garfield
On Thu, Jun 17, 2021, at 3:01 AM, Côme Chilliet wrote: > Le Wed, 16 Jun 2021 11:16:28 -0500, > "Larry Garfield" a écrit : > > > Hi folks. The vote for the Partial Function Application RFC is now open, > > and > > will run until 30 June. > > > > https://wiki.php.net/rfc/partial_function_applica

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-17 Thread Côme Chilliet
Le Wed, 16 Jun 2021 11:16:28 -0500, "Larry Garfield" a écrit : > Hi folks. The vote for the Partial Function Application RFC is now open, and > will run until 30 June. > > https://wiki.php.net/rfc/partial_function_application From the RFC: > The ? character was chosen for the placeholder larg

Re: [PHP-DEV] [Vote] Partial Function Application

2021-06-17 Thread Côme Chilliet
Le Wed, 16 Jun 2021 11:16:28 -0500, "Larry Garfield" a écrit : > Hi folks. The vote for the Partial Function Application RFC is now open, and > will run until 30 June. > > https://wiki.php.net/rfc/partial_function_application I do not understand how this ... placeholder works, it feels inconsi

[PHP-DEV] [Vote] Partial Function Application

2021-06-16 Thread Larry Garfield
Hi folks. The vote for the Partial Function Application RFC is now open, and will run until 30 June. https://wiki.php.net/rfc/partial_function_application Of particular note, a few people had asked about using ...? instead of ... for the variadic placeholder. In the end we decided not to expl