Re: [PHP-DEV] Final anonymous classes

2023-11-02 Thread daniil
Hi, > One thing I'm not sure about: What opcache optimizations would final enable?  Well for example, any JIT logic gated behind a check on ZEND_ACC_FINAL: https://github.com/php/php-src/blob/master/ext/opcache/jit/zend_jit_trace.c#L4507 Regards, Daniil Gentili

Re: [PHP-DEV] Final anonymous classes

2023-10-18 Thread Larry Garfield
On Wed, Oct 18, 2023, at 12:35 PM, Robert Landers wrote: > On Wed, Oct 18, 2023 at 2:26 PM Tim Düsterhus wrote: >> >> Hi >> >> On 10/17/23 19:06, Daniil Gentili wrote: >> > Personally, I would have instead preferred the much cleaner approach of >> > making *all* anonymous classes final by

Re: [PHP-DEV] Final anonymous classes

2023-10-18 Thread Robert Landers
On Wed, Oct 18, 2023 at 2:26 PM Tim Düsterhus wrote: > > Hi > > On 10/17/23 19:06, Daniil Gentili wrote: > > Personally, I would have instead preferred the much cleaner approach of > > making *all* anonymous classes final by default, (preferrably) without > > offering the option to make them

Re: [PHP-DEV] Final anonymous classes

2023-10-18 Thread Tim Düsterhus
Hi On 10/17/23 19:06, Daniil Gentili wrote: Personally, I would have instead preferred the much cleaner approach of making *all* anonymous classes final by default, (preferrably) without offering the option to make them non-final. However, I understand that this might be a little bit too

Re: [PHP-DEV] Final anonymous classes

2023-10-17 Thread Saki Takamachi
Hi, Daniil > Personally, I would have instead preferred the much cleaner approach of > making *all* anonymous classes final by default, (preferrably) without > offering the option to make them non-final. > > However, I understand that this might be a little bit too restrictive for > something

[PHP-DEV] Final anonymous classes

2023-10-17 Thread Daniil Gentili
Hi everyone, I'd like to submit an RFC to add support for final anonymous classes. This should also allow some additional opcache optimizations. I've already prepared the implementation at https://github.com/php/php-src/pull/11126, what do you think? Personally, I would have instead

Re: [PHP-DEV] Final anonymous classes

2023-05-06 Thread Larry Garfield
On Sat, May 6, 2023, at 2:16 AM, Rokas Šleinius wrote: > On Fri, 5 May 2023 at 23:58, Levi Morrison via internals > wrote: >> >> I am not sure about making them final by default. I think it's a more >> consistent language design to allow `new final class()` as you >> originally proposed. Although

Re: [PHP-DEV] Final anonymous classes

2023-05-06 Thread Rokas Šleinius
On Fri, 5 May 2023 at 23:58, Levi Morrison via internals wrote: > > I am not sure about making them final by default. I think it's a more > consistent language design to allow `new final class()` as you > originally proposed. Although I don't know why anyone would want to > extend anonymous

Re: [PHP-DEV] Final anonymous classes

2023-05-05 Thread Levi Morrison via internals
I am not sure about making them final by default. I think it's a more consistent language design to allow `new final class()` as you originally proposed. Although I don't know why anyone would want to extend anonymous classes, we can see that people do, in fact, do it. I don't see why we couldn't

Re: [PHP-DEV] Final anonymous classes

2023-05-05 Thread Derick Rethans
On Mon, 24 Apr 2023, Daniil Gentili wrote: > I've submitted https://github.com/php/php-src/pull/11126 to add > support for final anonymous classes, though as noted by iluuu1994, it > would probably make more sense to just make all anonymous classes > final by default, what do you think? Yes.

Re: [PHP-DEV] Final anonymous classes

2023-04-25 Thread Juliette Reinders Folmer
On 24-4-2023 12:28, Daniil Gentili wrote: Hi all, I've submitted https://github.com/php/php-src/pull/11126 to add support for final anonymous classes, though as noted by iluuu1994, it would probably make more sense to just make all anonymous classes final by default, what do you think?

Re: [PHP-DEV] Final anonymous classes

2023-04-25 Thread Claude Pache
> Le 25 avr. 2023 à 15:46, Nicolas Grekas a > écrit : > >  > Because they conceptually don't create a new type, I wonder if (final) > anonymous classes could be allowed to extend final classes? In order to not > allow hacking around and still create a type with class_alias(), we should >

Re: [PHP-DEV] Final anonymous classes

2023-04-25 Thread Larry Garfield
On Tue, Apr 25, 2023, at 1:21 PM, Ilija Tovilo wrote: > Hi Claude > >> > Hi all, >> > >> > I've submitted https://github.com/php/php-src/pull/11126 to add support >> > for final anonymous classes, though as noted by iluuu1994, it would >> > probably make more sense to just make all anonymous

Re: [PHP-DEV] Final anonymous classes

2023-04-25 Thread Nicolas Grekas
Hi all, > > I've submitted https://github.com/php/php-src/pull/11126 to add support > for final anonymous classes, though as noted by iluuu1994, it would > probably make more sense to just make all anonymous classes final by > default, what do you think? > > > > Extending an anonymous class is

Re: [PHP-DEV] Final anonymous classes

2023-04-25 Thread Ilija Tovilo
Hi Claude > > Hi all, > > > > I've submitted https://github.com/php/php-src/pull/11126 to add support for > > final anonymous classes, though as noted by iluuu1994, it would probably > > make more sense to just make all anonymous classes final by default, what > > do you think? > > Extending

Re: [PHP-DEV] Final anonymous classes

2023-04-24 Thread Claude Pache
> Le 24 avr. 2023 à 12:28, Daniil Gentili a écrit : > > Hi all, > > I've submitted https://github.com/php/php-src/pull/11126 to add support for > final anonymous classes, though as noted by iluuu1994, it would probably make > more sense to just make all anonymous classes final by default,

[PHP-DEV] Final anonymous classes

2023-04-24 Thread Daniil Gentili
Hi all, I've submitted https://github.com/php/php-src/pull/11126 to add support for final anonymous classes, though as noted by iluuu1994, it would probably make more sense to just make all anonymous classes final by default, what do you think? Daniil Gentili. -- PHP Internals - PHP