Re: [PHP-DEV] [RFC] Asymmetric Visibility, v2

2024-05-31 Thread Claude Pache
> Le 30 mai 2024 à 17:07, Derick Rethans a écrit : > >> >> Now, if I define the property as public private(set) with similar >> intentions, to make sure that there is no way for external scope or >> extending classes scope to write to the property, while allowing >> reading from external sc

Re: [PHP-DEV] [RFC] Asymmetric Visibility, v2

2024-05-31 Thread Alexandru Pătrănescu
On Fri, May 31, 2024 at 10:30 AM Claude Pache wrote: > > > Le 30 mai 2024 à 17:07, Derick Rethans a écrit : > > > Now, if I define the property as public private(set) with similar > intentions, to make sure that there is no way for external scope or > extending classes scope to write to the prop

Re: [PHP-DEV] [RFC] Asymmetric Visibility, v2

2024-05-31 Thread Claude Pache
> Le 30 mai 2024 à 12:16, Vincent de Lau a écrit : > >> >> We went through a bunch of syntax variations last year, including "public >> private", "public:private", and "public private:set", plus a few others. >> In an RCV poll, public private(set) was the favorite. (See link at the end >> of t

[PHP-DEV] [RFC] [discussion] Correctly name the rounding mode and make it an Enum

2024-05-31 Thread Saki Takamachi
Hi, internals! I would like to start an RFC discussion regarding rounding modes. https://wiki.php.net/rfc/correctly_name_the_rounding_mode_and_make_it_an_enum As mentioned previously by Gina on the mailing list [1], there are some issues with PHP's current rounding mode. [1] - https://externals.

Re: [PHP-DEV] [RFC] [discussion] Correctly name the rounding mode and make it an Enum

2024-05-31 Thread Erick de Azevedo Lima
> To resolve these issues, change the naming to something appropriate and use Enums instead of int constants. Hi! I like the idea. But I don't know >From the RFC text: > To summarize, existing features will be changed to a union type of int| \RoundingMode, and unreleased features will only accept

Re: [PHP-DEV] [RFC] [discussion] Correctly name the rounding mode and make it an Enum

2024-05-31 Thread Erick de Azevedo Lima
Hi. > I like the idea. But I don't know Please ignore this. Some copy-past leftovers. Sorry!

Re: [PHP-DEV] [RFC] Asymmetric Visibility, v2

2024-05-31 Thread Larry Garfield
On Fri, May 31, 2024, at 12:04 PM, Alexandru Pătrănescu wrote: > On Fri, May 31, 2024 at 10:30 AM Claude Pache wrote: >> >> >>> Le 30 mai 2024 à 17:07, Derick Rethans a écrit : >>> Now, if I define the property as public private(set) with similar intentions, to make sure that

Re: [PHP-DEV] [RFC] [discussion] Correctly name the rounding mode and make it an Enum

2024-05-31 Thread Jorg Sowa
Hey Saki, I like this change. When I was implementing additional rounding modes for the next PHP version I was initially struggling with the naming and this change will be helpful. I have only one concern about the names `NegativeInfinity` and `PositiveInfinity`. They may be too formal from the us

Re: [PHP-DEV] [RFC] [discussion] Correctly name the rounding mode and make it an Enum

2024-05-31 Thread Elminson De Oleo Baez
Thank you for the clarification Erick Sent from IPhone On Fri, May 31, 2024 at 12:59 PM Erick de Azevedo Lima < ericklima.c...@gmail.com> wrote: > Hi. > > > I like the idea. But I don't know > Please ignore this. > Some copy-past leftovers. > > Sorry! > >

Re: [PHP-DEV] [RFC] [discussion] Correctly name the rounding mode and make it an Enum

2024-05-31 Thread Larry Garfield
On Fri, May 31, 2024, at 4:41 PM, Jorg Sowa wrote: > Hey Saki, > I like this change. When I was implementing additional rounding modes > for the next PHP version I was initially struggling with the naming and > this change will be helpful. > > I have only one concern about the names `NegativeInfi

Re: [PHP-DEV] [RFC] Asymmetric Visibility, v2

2024-05-31 Thread Claude Pache
> Le 31 mai 2024 à 18:08, Larry Garfield a écrit : > > However, this also brings up another interesting issue: readonly properties > (in 8.3) DO allow redeclaration, essentially adjusting the property scope > (the class that declares it) to make the visibility check pass. That is, the > defi

Re: [PHP-DEV] [RFC] Asymmetric Visibility, v2

2024-05-31 Thread Larry Garfield
On Fri, May 31, 2024, at 5:45 PM, Claude Pache wrote: >> Le 31 mai 2024 à 18:08, Larry Garfield a écrit : >> >> However, this also brings up another interesting issue: readonly properties >> (in 8.3) DO allow redeclaration, essentially adjusting the property scope >> (the class that declares it

Re: [PHP-DEV] [RFC] Asymmetric Visibility, v2

2024-05-31 Thread Robert Landers
On Fri, May 31, 2024 at 9:13 PM Claude Pache wrote: > > > > Le 31 mai 2024 à 18:08, Larry Garfield a écrit : > > However, this also brings up another interesting issue: readonly properties > (in 8.3) DO allow redeclaration, essentially adjusting the property scope > (the class that declares it)

Re: [PHP-DEV] [RFC] Asymmetric Visibility, v2

2024-05-31 Thread Claude Pache
> Le 31 mai 2024 à 18:08, Larry Garfield a écrit : > > So we feel the best way forward is to make the following changes: > > * private(set) implicitly means "final". (You can declare it explicitly if > you want, but it isn't necessary.) > * Make readonly incompatible with aviz again. > > Th

Re: [PHP-DEV] [RFC] Asymmetric Visibility, v2

2024-05-31 Thread Erick de Azevedo Lima
> So we feel the best way forward is to make the following changes: > > * private(set) implicitly means "final". (You can declare it explicitly if you want, but it isn't necessary.) > * Make readonly incompatible with aviz again. I'd make readonly incompatible with aviz. Readonly props have its "

Re: [PHP-DEV] [RFC] [discussion] Correctly name the rounding mode and make it an Enum

2024-05-31 Thread Gina P. Banyard
On Friday, 31 May 2024 at 18:15, Larry Garfield wrote: > On Fri, May 31, 2024, at 4:41 PM, Jorg Sowa wrote: > > > Hey Saki, > > I like this change. When I was implementing additional rounding modes > > for the next PHP version I was initially struggling with the naming and > > this change will b

Re: [PHP-DEV] [RFC] [discussion] Correctly name the rounding mode and make it an Enum

2024-05-31 Thread Gina P. Banyard
On Friday, 31 May 2024 at 15:49, Saki Takamachi wrote: > Hi, internals! > > I would like to start an RFC discussion regarding rounding modes. > https://wiki.php.net/rfc/correctly_name_the_rounding_mode_and_make_it_an_enum > > As mentioned previously by Gina on the mailing list [1], there ar