Re: [PHP-DEV] RFC [Discussion]: array_find

2024-04-10 Thread Levi Morrison
> On 07.04.24 16:35, Larry Garfield wrote: > > 1. Should this work on arrays or iterables? This is a long standing > > limitation of PHP. The array operations don't work on iterables, even > > though we've had iterables for 20 years.) > > In the longer term, it definitely makes sense to create

Re: [PHP-DEV] RFC [Discussion]: array_find

2024-04-10 Thread Levi Morrison
On Sun, Apr 7, 2024 at 8:38 AM Larry Garfield wrote: > > On Sun, Apr 7, 2024, at 10:20 AM, Joshua Rüsweg wrote: > > Hi > > I have created an RFC to add the function array_find which returns the > > first element for which a predicate callback returns true. This is a > > function which I missed

Re: External Message: Re: [PHP-DEV] [RFC][Vote announcement] Property hooks

2024-04-10 Thread Robert Landers
On Wed, Apr 10, 2024 at 10:41 PM Mark Trapp wrote: > > On Wed, Apr 10, 2024 at 9:59 AM Jeffrey Dafoe wrote: > > > > > On Wed, Apr 10, 2024 at 4:01 PM Erick de Azevedo Lima > > > wrote: > > > Maybe if such a feedback was given before and it was decided to go for

Re: External Message: Re: [PHP-DEV] [RFC][Vote announcement] Property hooks

2024-04-10 Thread Mark Trapp
On Wed, Apr 10, 2024 at 9:59 AM Jeffrey Dafoe wrote: > > > On Wed, Apr 10, 2024 at 4:01 PM Erick de Azevedo Lima > > wrote: > > Maybe if such a feedback was given before and it was decided to go for a > > trimmed version of the feature, maybe Ilija/Larry could

Re: [PHP-DEV] [RFC][Vote announcement] Property hooks

2024-04-10 Thread Arvids Godjuks
On Wed, 10 Apr 2024 at 22:31, Tim Düsterhus wrote: > Hi > > On 4/10/24 10:28, Arvids Godjuks wrote: > > The amount of complexity in these two hooks is on the level of the whole > > PHP OOP model with the number of footguns and WTF cases to rival magic > > quotes, register_globals=on and every

Re: [PHP-DEV] [RFC][Vote announcement] Property hooks

2024-04-10 Thread Tim Düsterhus
Hi On 4/10/24 10:28, Arvids Godjuks wrote: The amount of complexity in these two hooks is on the level of the whole PHP OOP model with the number of footguns and WTF cases to rival magic quotes, register_globals=on and every other infamous gotcha we had in the engine that got deleted out of

Re: [PHP-DEV] RFC [Discussion]: array_find

2024-04-10 Thread Tim Düsterhus
Hi On 4/10/24 00:12, Larry Garfield wrote: I feel the same. Adding an enum for each binary parameter that is semantically true and false feels quite unwieldy with how class / enums / interfaces are currently organized in the namespace hierarchy. Point of order: This parameter is *not*

Re: [PHP-DEV] [RFC][Vote announcement] Property hooks

2024-04-10 Thread Marco Pivetta
On Wed, 10 Apr 2024 at 18:52, Erick de Azevedo Lima < ericklima.c...@gmail.com> wrote: > > Reminder to not run into a sunk cost fallacy. > > My main point was not the cost/work itself, but the fact that big concerns > should be raised ASAP, and not on the 11th hour, as Robert said. > Whether we

RE: External Message: Re: [PHP-DEV] [RFC][Vote announcement] Property hooks

2024-04-10 Thread Jeffrey Dafoe
> On Wed, Apr 10, 2024 at 4:01 PM Erick de Azevedo Lima > wrote: > Maybe if such a feedback was given before and it was decided to go for a > trimmed version of the feature, maybe Ilija/Larry could have had less work to > implement and test all the variantes

Re: [PHP-DEV] [RFC][Vote announcement] Property hooks

2024-04-10 Thread Erick de Azevedo Lima
> Reminder to not run into a sunk cost fallacy. My main point was not the cost/work itself, but the fact that big concerns should be raised ASAP, and not on the 11th hour, as Robert said. Whether we like it or not, the voting right beholders' concerns should be taken into account with "special

Re: [PHP-DEV] [RFC] [Discussion] Support object type in BCMath

2024-04-10 Thread Saki Takamachi
Hi Rowan, > Yes, I agree there's a dilemma there. > > The extra point in favour of TOWARD_ZERO is that it's more efficient, because > we don't have to over-calculate and round, just pass scale directly to the > implementation. Any other option makes for unnecessary extra calculation in > code

Re: [PHP-DEV] [RFC][Vote announcement] Property hooks

2024-04-10 Thread Marco Pivetta
On Wed, 10 Apr 2024 at 16:56, Alex Wells wrote: > On Wed, Apr 10, 2024 at 4:01 PM Erick de Azevedo Lima < > ericklima.c...@gmail.com> wrote: > >> Maybe if such a feedback was given before and it was decided to go for a >> trimmed version of the feature, maybe Ilija/Larry could have had less work

Re: [PHP-DEV] [RFC][Vote announcement] Property hooks

2024-04-10 Thread Saki Takamachi
Hi, > To an outsider, it looks wild when feedback starts coming in right before the > vote starts. What's even more startling is that there are people with voting > rights who have never participated in the discussion at all, yet have a right > to wordlessly affect the vote's outcome. I

Re: [PHP-DEV] [RFC][Vote announcement] Property hooks

2024-04-10 Thread ericmann
On 4/10/24 07:56, Alex Wells wrote: To an outsider, it looks wild when feedback starts coming in right before the vote starts. What's even more startling is that there are people with voting rights who have never participated in the discussion at all, yet have a right to wordlessly affect the

Re: [PHP-DEV] [RFC][Vote announcement] Property hooks

2024-04-10 Thread Bilge
On 10/04/2024 15:56, Alex Wells wrote: To an outsider, it looks wild when feedback starts coming in right before the vote starts. What's even more startling is that there are people with voting rights who have never participated in the discussion at all, yet have a right to wordlessly affect

Re: [PHP-DEV] [RFC][Vote announcement] Property hooks

2024-04-10 Thread Nicolas Grekas
Hi Ilija, Larry, Heads-up: Larry and I would like to start the vote of the property > hooks RFC tomorrow: > https://wiki.php.net/rfc/property-hooks > I would make 3 changes to the RFC if I were in charge : - I'd make $this->propName inside a hook access the parent property via its hooks

Re: [PHP-DEV] [RFC][Vote announcement] Property hooks

2024-04-10 Thread Alex Wells
On Wed, Apr 10, 2024 at 4:01 PM Erick de Azevedo Lima < ericklima.c...@gmail.com> wrote: > Maybe if such a feedback was given before and it was decided to go for a > trimmed version of the feature, maybe Ilija/Larry could have had less work > to implement and test all the variantes they've done.

Re: [PHP-DEV] [RFC] [Discussion] Support object type in BCMath

2024-04-10 Thread Rowan Tommins [IMSoP]
On 10 April 2024 10:38:44 BST, Saki Takamachi wrote: >I was thinking about this today, and I think both are correct opinions on >whether to set the initial value to HALF_UP or TOWARD_ZERO. It's just a matter >of prioritizing whether consistency with existing behavior or consistency >within a

Re: [PHP-DEV] [RFC][Vote announcement] Property hooks

2024-04-10 Thread Erick de Azevedo Lima
> As someone who has spent a number of years writing C#, the RFC look> quite sane. Same here. > Removing it because "it complicates things" isn't really a good reason, IMHO. I think the same. FFI, for instance, is powerful but one can make a mess with it. > Then watching the feedback here, at

Re: [PHP-DEV] [RFC][Vote announcement] Property hooks

2024-04-10 Thread Matteo Beccati
Hi, Il 10/04/2024 05:40, Juliette Reinders Folmer ha scritto: --- TL;DR: this RFC tries to do too much in one go and introduces a huge amount of cognitive complexity with all the exceptions and the differences in behaviour between virtual and backed properties. This cognitive complexity is

Re: [PHP-DEV] [RFC][Vote announcement] Property hooks

2024-04-10 Thread Robert Landers
On Wed, Apr 10, 2024 at 5:49 AM Juliette Reinders Folmer wrote: > > On 9-4-2024 16:03, Juliette Reinders Folmer wrote: > > On 8-4-2024 23:39, Ilija Tovilo wrote: > > Hi everyone > > Heads-up: Larry and I would like to start the vote of the property > hooks RFC tomorrow: >

Re: [PHP-DEV] [RFC] [Discussion] Support object type in BCMath

2024-04-10 Thread Saki Takamachi
Hi Rowan, > That's why I mentioned the two different groups of users. The scale and > rounding mode aren't there for group (a), who just want the scale to be > managed automatically; they are there for group (b), who want to guarantee a > particular result has a particular scale. The result of

Re: [PHP-DEV] [RFC][Vote announcement] Property hooks

2024-04-10 Thread Arvids Godjuks
On Wed, 10 Apr 2024 at 06:43, Juliette Reinders Folmer < php-internals_nos...@adviesenzo.nl> wrote: > On 9-4-2024 16:03, Juliette Reinders Folmer wrote: > > On 8-4-2024 23:39, Ilija Tovilo wrote: > > Hi everyone > > Heads-up: Larry and I would like to start the vote of the property > hooks RFC

Re: [PHP-DEV] [RFC][Vote announcement] Property hooks

2024-04-10 Thread Lynn
On Wed, Apr 10, 2024 at 5:47 AM Juliette Reinders Folmer < php-internals_nos...@adviesenzo.nl> wrote: > On 9-4-2024 16:03, Juliette Reinders Folmer wrote: > > On 8-4-2024 23:39, Ilija Tovilo wrote: > > Hi everyone > > Heads-up: Larry and I would like to start the vote of the property > hooks RFC

Re: [PHP-DEV] [RFC] [Discussion] Support object type in BCMath

2024-04-10 Thread Rowan Tommins [IMSoP]
On 10 April 2024 00:36:21 BST, Saki Takamachi wrote: >- The scale and rounding mode are not required for example in add, since the >scale of the result will never be infinite and we can automatically calculate >the scale needed to fit the result. Does adding those two options to all

Re: [PHP-DEV] Native decimal scalar support and object types in BcMath - do we want both?

2024-04-10 Thread Arvids Godjuks
On Tue, 9 Apr 2024 at 09:57, Rowan Tommins [IMSoP] wrote: > > > On 8 April 2024 21:51:46 BST, Jordan LeDoux > wrote: > >I have mentioned before that my understanding of the deeper aspects of how > >zvals work is very lacking compared to some others, so this is very > >helpful. > > My own