Re: [Vote] Partial Function Application
| From: | Guilliam Xavier | Date: | Tue, 29 Jun 2021 17:37:24 +0000 |
| Subject: | Re: [Vote] Partial Function Application | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-115217@lists.php.net to get a copy of this message | ||
On Tue, Jun 29, 2021 at 11:04 AM Côme Chilliet <
come.chilliet@fusiondirectory.org> wrote:
> Le Thu, 17 Jun 2021 08:30:43 -0500,
> "Larry Garfield" <larry@garfieldtech.com> 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 $$
> > > > (lovingly called T_BLING) sigil instead. So far no compelling
> argument
> > > > has been provided for changing the character, so the RFC is sticking
> > > > with ?.
> > >
> > > The main argument for $$ is to be able to have partial methods with
> $$->,
> > > this should be stated in this paragraph.
> >
> > That's not something that was ever brought up in the discussion.
>
> Finally found where I read that, it’s in an other RFC:
>
>
> https://wiki.php.net/rfc/first_class_callable_syntax#partial_function_application
>
For the record, Larry replied on this subject:
https://externals.io/message/114770#114785
(second part).
Note that for
$$->foo(/*whatever*/) the signature couldn't be extracted
(because the class of $$ is unknown).
Regards,
--
Guilliam Xavier