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 <pthreads@pthreads.org
> <mailto:pthreads@pthreads.org>> wrote:
>
> 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.
>
OK. so this is not just a syntax sugar, but if you implement lexical
scope for anonymous classes it's going to be sugar. Right?
May be it's better to start from classes first?
>
> Even when anon classes do have lexical scope, there is value in
> being able to implement these kinds of interfaces using only a
> function.
>
What value? just shorter syntax? or anything else?
>
> The changes to the vm are restricted to a few lines, that's not
> seriously a problem, is it !?
>
I hope no. I didn't understand all details of proposal and I didn't take
a deep look into the code.
>
> I don't see where I extend closure with an interface ...
>
I meant new field zend_execute_data *interface in zend_closure structure.
I thought the same might be implemented through anonymous classes.
Thanks. Dmitry.