Re: [RFC] Partial function application

From: Date: Sun, 25 Apr 2021 22:18:17 +0000
Subject: Re: [RFC] Partial function application
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-114170@lists.php.net to get a copy of this message
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 <maxsem.wiki@gmail.com> wrote:
> >
> > On Sun, Apr 25, 2021 at 10:26 PM Larry Garfield <larry@garfieldtech.com>
> > 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(?)?
> 
> It works for methods as well, as stated in the proposal section. I
> think there aren't any examples in the RFC just because functions make
> for shorter examples ^_^  but we should add some to help make that
> clear.

Ha, yes, I didn't realize we were missing those. :-)  I just added a Methods section.  In
short, yes, it works for methods, functions, closures, basically anything you can otherwise call.

--Larry Garfield


Thread (68 messages)

« previous php.internals (#114170) next »