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:
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,
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
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
For me, the proposal is too complex.
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.
But this is my personal opinion, and I may be wrong :)
I'll review the code later.
Thanks.
On 04/19/2016 03:52 PM, Joe Watkins wrote:
Oh, it's confusing text in the RFC, using the word "Interface" ...
that's meant as a placeholder for InterfaceName.
Cheers
Joe
On Tue, Apr 19, 2016 at 1:50 PM, Joe Watkins > wrote:
Morning
> What value?
Yes, shorter, more concise (from the programmers perspective) syntax.
Right now, if you do a lot of work with Closures, you have to verify their
interface, the value in having the engine do it for you seems really
obvious.
But also ...
> I thought the same might be implemented
Oh, it's confusing text in the RFC, using the word "Interface" ... that's
meant as a placeholder for InterfaceName.
Cheers
Joe
On Tue, Apr 19, 2016 at 1:50 PM, Joe Watkins wrote:
> Morning Dmitry,
>
> In your example, they will do the same thing.
>
> Anon classes
Morning Dmitry,
In your example, they will do the same thing.
Anon classes don't have lexical scope, I have a patch for that, and an
RFC, I'm just tidying it.
Even when anon classes do have lexical scope, there is value in being
able to implement these kinds of interfaces using only a
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 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
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
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
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
+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
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
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,
19 matches
Mail list logo