Larry Garfield wrote on 19/04/2016 16:21:
Which is why I'm not sure I like that approach, because the place I
then call $handler needs to have a conditional in it. There's another
RFC that was posted to Twitter but hasn't made it to the list yet that
seems to solve this better:
https://wiki.
Hi!
2016-04-19 11:21 GMT-04:00 Larry Garfield :
> On 4/19/16 10:02 AM, Rowan Collins wrote:
>
>> Dmitry Stogov wrote on 19/04/2016 15:48:
>>
>>> callable-type is much simpler solution for this use-case.
>>> Usage of Interfaces to check function prototypes is a bit tricky, but
>>> yes, this is a p
On 4/19/16 10:02 AM, Rowan Collins wrote:
Dmitry Stogov wrote on 19/04/2016 15:48:
callable-type is much simpler solution for this use-case.
Usage of Interfaces to check function prototypes is a bit tricky, but
yes, this is a possible use-case.
Do you like to work with framework, that use this
Dmitry Stogov wrote on 19/04/2016 15:48:
callable-type is much simpler solution for this use-case.
Usage of Interfaces to check function prototypes is a bit tricky, but
yes, this is a possible use-case.
Do you like to work with framework, that use this trick for every
callback?
If you don't
On 04/19/2016 05:30 PM, Rowan Collins wrote:
Dmitry Stogov wrote on 19/04/2016 15:12:
I prefer intuitive concepts, that I may use without rereading manual
again and again.
For this one, I even can't imagine a natural (not over-designed) use
case.
The use case that came to my mind is kind o
Dmitry Stogov wrote on 19/04/2016 15:12:
I prefer intuitive concepts, that I may use without rereading manual
again and again.
For this one, I even can't imagine a natural (not over-designed) use
case.
The use case that came to my mind is kind of the other way around from
"syntax sugar for a
implement it as a sugar (without
VM changes).
But may be I didn't understand the idea at all :)
Thanks. Dmitry.
From: Joe Watkins mailto:pthre...@pthreads.org>>
S
Joe Watkins mailto:pthre...@pthreads.org>>
Sent: Monday, April 18, 2016 13:22
To: PHP internals
Subject: [PHP-DEV] RFC: Functional Interfaces
Morning Internals,
Please review the following RFC:
https://wiki.php.net/rfc/functional-interfaces
nction method() : int {
>>> return 42;
>>> }
>>> };
>>> ?>
>>>
>>> Are $cb1 and $cb2 going to be the same (do the same)?
>>> Is this just a new syntax sugar, or a really new feature?
>>>
>>> According to implementati
to implementation, I think, you shouldn't extend "zend_closure"
>> with "interface".
>> If this is a sugar, lets implement it as a sugar (without VM changes).
>>
>> But may be I didn't understand the idea at all :)
>>
>> Thanks. Dmitry.
>
quot;.
> If this is a sugar, lets implement it as a sugar (without VM changes).
>
> But may be I didn't understand the idea at all :)
>
> Thanks. Dmitry.
>
>
> ________
> From: Joe Watkins
> Sent: Monday, April 18, 2016 13
M changes).
But may be I didn't understand the idea at all :)
Thanks. Dmitry.
From: Joe Watkins
Sent: Monday, April 18, 2016 13:22
To: PHP internals
Subject: [PHP-DEV] RFC: Functional Interfaces
Morning Internals,
Please review the following RFC:
On Mon, Apr 18, 2016 at 12:17 PM, Stanislav Malyshev
wrote:
> Hi!
>
>> Please review the following RFC:
>> https://wiki.php.net/rfc/functional-interfaces
>> An implementation is provided, and is testable on 3v4l.
>
> This looks like a rather narrow case already covered by anonymous
> c
Hi!
2016-04-18 15:17 GMT-04:00 Stanislav Malyshev :
> Hi!
>
> > Please review the following RFC:
> >
> > https://wiki.php.net/rfc/functional-interfaces
> >
> > An implementation is provided, and is testable on 3v4l.
>
> This looks like a rather narrow case already covered by anonymous
Hi!
> Please review the following RFC:
>
> https://wiki.php.net/rfc/functional-interfaces
>
> An implementation is provided, and is testable on 3v4l.
This looks like a rather narrow case already covered by anonymous
classes. Am I missing something? What is the added value of it that
+1 for the feature, very nice syntactic sugar to solve some edge cases.
I agree with Rowan, i also do not like the name and propose to call them
*closure interfaces*. There are already various synonyms for closures:
- anonymous function
- lambda function
- callback*
However, the strongest argume
Joe Watkins wrote on 18/04/2016 12:53:
Morning,
> I must admit to being a bit confused by the term "functional
interface" at first, though,
> because "functional" has so many different meanings - is this a
term used elsewhere,
> or is it up for debate?
The terminology is borrowed
Morning,
> I must admit to being a bit confused by the term "functional
interface" at first, though,
> because "functional" has so many different meanings - is this a term
used elsewhere,
> or is it up for debate?
The terminology is borrowed, Java 8 uses lamdas to implement specially
Joe Watkins wrote on 18/04/2016 11:22:
Please review the following RFC:
https://wiki.php.net/rfc/functional-interfaces
An implementation is provided, and is testable on 3v4l.
This sounds like a really nice feature. As well as using functions to
implement existing interfaces, i
Morning Internals,
Please review the following RFC:
https://wiki.php.net/rfc/functional-interfaces
An implementation is provided, and is testable on 3v4l.
Review of the implementation from those of you that do that would be
good :)
Cheers
Joe
20 matches
Mail list logo