Re: [PHP-DEV] Re: [RFC][Discussion] Harmonise "untyped" and "typed" properties

2023-11-23 Thread Rowan Tommins
On Thu, 23 Nov 2023 at 08:48, Nicolas Grekas wrote: > Sorry this comes as a surprise to you but you're rewriting history here. > The current behavior, the one that was fixed in that commit, matches how > PHP behaved before typed properties, so this commit brought consistency. > The question of

Re: [PHP-DEV] Re: [RFC][Discussion] Harmonise "untyped" and "typed" properties

2023-11-23 Thread Nikita Popov
On Thu, Nov 23, 2023, at 09:48, Nicolas Grekas wrote: > Hi Rowan, > > Le jeu. 23 nov. 2023 à 08:56, Rowan Tommins a > écrit : > > > On 23 November 2023 01:37:06 GMT, Claude Pache > > wrote: > > >What you describe in the last sentence is what was initially designed and > > implemented by the

Re: [PHP-DEV] Re: [RFC][Discussion] Harmonise "untyped" and "typed" properties

2023-11-23 Thread Nicolas Grekas
Hi Rowan, Le jeu. 23 nov. 2023 à 08:56, Rowan Tommins a écrit : > On 23 November 2023 01:37:06 GMT, Claude Pache > wrote: > >What you describe in the last sentence is what was initially designed and > implemented by the RFC: https://wiki.php.net/rfc/typed_properties_v2 > (section Overloaded

Re: [PHP-DEV] Re: [RFC][Discussion] Harmonise "untyped" and "typed" properties

2023-11-23 Thread Robert Landers
On Thu, Nov 23, 2023 at 8:56 AM Rowan Tommins wrote: > > On 23 November 2023 01:37:06 GMT, Claude Pache wrote: > >What you describe in the last sentence is what was initially designed and > >implemented by the RFC: https://wiki.php.net/rfc/typed_properties_v2 > >(section Overloaded

Re: [PHP-DEV] Re: [RFC][Discussion] Harmonise "untyped" and "typed" properties

2023-11-22 Thread Rowan Tommins
On 23 November 2023 01:37:06 GMT, Claude Pache wrote: >What you describe in the last sentence is what was initially designed and >implemented by the RFC: https://wiki.php.net/rfc/typed_properties_v2 (section >Overloaded Properties). > >However, it was later changed to the current semantics

Re: [PHP-DEV] Re: [RFC][Discussion] Harmonise "untyped" and "typed" properties

2023-11-22 Thread Claude Pache
> Le 22 nov. 2023 à 23:17, Rowan Tommins a écrit : > > I'm probably going to regret asking this, but is there some reason it works > that way? Is there any chance of changing it to just: > >> Typed properties start off as uninitialized. >> >> Once you've assigned a value, you can't go back

Re: [PHP-DEV] Re: [RFC][Discussion] Harmonise "untyped" and "typed" properties

2023-11-22 Thread Rowan Tommins
On 22 November 2023 14:12:09 GMT, Nicolas Grekas wrote: >I think there is an inaccuracy that needs to be fixed in the after-unset >state : as noted later in the RFC, magic accessors are called after an >unset($this->typedProps). This means the state cannot be described as >identical

Re: [PHP-DEV] Re: [RFC][Discussion] Harmonise "untyped" and "typed" properties

2023-11-22 Thread Nicolas Grekas
Hi Rowan, Larry, Thanks for the RFC. I think there is an inaccuracy that needs to be fixed in the after-unset state : as noted later in the RFC, magic accessors are called after an unset($this->typedProps). This means the state cannot be described as identical ("uninitialized') before and after

Re: [PHP-DEV] Re: [RFC][Discussion] Harmonise "untyped" and "typed" properties

2023-11-22 Thread Robert Landers
On Tue, Nov 21, 2023 at 12:41 AM Larry Garfield wrote: > > On Mon, Nov 20, 2023, at 11:08 PM, Rowan Tommins wrote: > > On 16/11/2023 20:41, Rowan Tommins wrote: > >> Hi all, > >> > >> I have finally written up an RFC I have been considering for some > >> time: Harmonise "untyped" and "typed"

Re: [PHP-DEV] Re: [RFC][Discussion] Harmonise "untyped" and "typed" properties

2023-11-20 Thread Larry Garfield
On Mon, Nov 20, 2023, at 11:08 PM, Rowan Tommins wrote: > On 16/11/2023 20:41, Rowan Tommins wrote: >> Hi all, >> >> I have finally written up an RFC I have been considering for some >> time: Harmonise "untyped" and "typed" properties >> >> RFC URL:

[PHP-DEV] Re: [RFC][Discussion] Harmonise "untyped" and "typed" properties

2023-11-20 Thread Rowan Tommins
On 16/11/2023 20:41, Rowan Tommins wrote: Hi all, I have finally written up an RFC I have been considering for some time: Harmonise "untyped" and "typed" properties RFC URL: https://wiki.php.net/rfc/mixed_vs_untyped_properties I've revised the RFC; it now proposes to keep the implicit "=