Re: Re: [PHP-DEV] Re: Pre proposal for "Class extension functions"

2018-09-27 Thread Rowan Collins
On Thu, 27 Sep 2018 at 16:15, Andrey O Gromov wrote: > > In dynamic languages like JavaScript, you're literally writing to a > > map of methods, which means execution order is critical, and overwrites > are possible > Need some advice. Why execution order is critical? > Inserting into `ce->functi

HA: Re: [PHP-DEV] Re: Pre proposal for "Class extension functions"

2018-09-27 Thread Andrey O Gromov
I think that it is good idea to write page on RFC wiki with detailed descriptions, examples and motivations. I see that it can't be accepted in nearest future, but let it be for history. :) There is many open questions. I will try to resolve that I can. >>> Bring a little Javascript into PHP? >

Re: [PHP-DEV] Re: Pre proposal for "Class extension functions"

2018-09-26 Thread Rasmus Schultz
On Mon, Sep 24, 2018 at 11:24 PM Andrew Gromov wrote: > > Bring a little Javascript into PHP? > > In fact, I looked at Kotlin :) Kotlin does not modify classes. This sort of thing is sound in compiled languages like Kotlin and C#, where this is really syntactic sugar for calling user-defined fu

[PHP-DEV] Re: Pre proposal for "Class extension functions"

2018-09-24 Thread Andrew Gromov
I’m thinking a lot about potential problems. Some of them you voiced, but not all. My message was a question of whether the topic was interesting and whether it should be formatted as RFC. Bring a little Javascript into PHP? In fact, I looked at Kotlin :) (https://kotlinlang.org/docs/referen