Re: [PHP-DEV] Feature Discussion |

2025-06-11 Thread Lynn
On Mon, Jun 9, 2025 at 7:36 PM Dmitry Derepko wrote: > Hello, Internals! > > I've implemented an alpha implementation of the Extension Functions in PHP. > Basically, it's a syntax sugar of the imperative call of the function with > the passing the object as a first argument, but anyway. > > Here

Re: [PHP-DEV] Feature Discussion |

2025-06-10 Thread Rob Landers
On Wed, Jun 11, 2025, at 08:31, Dmitry Derepko wrote: > I see. > > The first thought is about extending the class definition: along with > functions hashtable we would add virtual functions HT and lookup for the > function will be another HT lookup. > > image.png > > That for sure is better th

Re: [PHP-DEV] Feature Discussion |

2025-06-10 Thread Dmitry Derepko
I see. The first thought is about extending the class definition: along with functions hashtable we would add virtual functions HT and lookup for the function will be another HT lookup. [image: image.png] That for sure is better than trap for cpu, but enlarge memory usage at the moment. --- M

Re: [PHP-DEV] Feature Discussion |

2025-06-10 Thread Rob Landers
On Tue, Jun 10, 2025, at 22:09, Larry Garfield wrote: > On Tue, Jun 10, 2025, at 2:45 PM, Dmitry Derepko wrote: > > Thanks for participating, Larry. > > > > On Mon, Jun 9, 2025 at 10:29 PM Larry Garfield > > wrote: > >> 2. Please link to a PR of your actual implementation. In context it looks >

Re: [PHP-DEV] Feature Discussion |

2025-06-10 Thread Larry Garfield
On Tue, Jun 10, 2025, at 2:45 PM, Dmitry Derepko wrote: > Thanks for participating, Larry. > > On Mon, Jun 9, 2025 at 10:29 PM Larry Garfield wrote: >> 2. Please link to a PR of your actual implementation. In context it looks >> like your branch comparison link is to the version you said didn't

Re: [PHP-DEV] Feature Discussion |

2025-06-10 Thread Dmitry Derepko
Thanks for participating, Larry. On Mon, Jun 9, 2025 at 10:29 PM Larry Garfield wrote: > 2. Please link to a PR of your actual implementation. In context it looks > like your branch comparison link is to the version you said didn't work, so > it's not that helpful. > Correct, I don't have an

Re: [PHP-DEV] Feature Discussion |

2025-06-09 Thread Larry Garfield
On Mon, Jun 9, 2025, at 12:34 PM, Dmitry Derepko wrote: > Hello, Internals! > > I've implemented an alpha implementation of the Extension Functions in > PHP. > Basically, it's a syntax sugar of the imperative call of the function > with the passing the object as a first argument, but anyway. > >

[PHP-DEV] Feature Discussion |

2025-06-09 Thread Dmitry Derepko
Hello, Internals! I've implemented an alpha implementation of the Extension Functions in PHP. Basically, it's a syntax sugar of the imperative call of the function with the passing the object as a first argument, but anyway. Here is how it looks like in Kotlin: https://kotlinlang.org/docs/extensi