Re: [RFC] Partial function application

From: Date: Thu, 13 May 2021 20:30:50 +0000
Subject: Re: [RFC] Partial function application
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-114469@lists.php.net to get a copy of this message
On Thu, May 13, 2021 at 2:31 PM Andreas Hennings <andreas@dqxtech.net>
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
serialization.


> 2. var_export()
>
>
Same as above, really.


3. Parameter switching
>
> Could we express the following as a partial function?
>
> static function ($a, $b) {return foo($b, $a);}
>
> E.g. as foo(?1, ?0) ?
>
>
Using named parameter we can:

foo(b: ?, a: ?);

-Sara


Thread (68 messages)

« previous php.internals (#114469) next »