Re: [PHP-DEV] [RFC] Allow object keys in arrays

2021-01-12 Thread Matthew Brown
This proposal is interesting, and I see why the enum proposal makes it useful. Supporting this will mean a small amount of work for me (assuming it passes) and other static analysis tools, but I don't want that to factor into anyone's decision. I am curious, though, whether the scope of this RFC

Re: [PHP-DEV] [RFC] Allow object keys in arrays

2021-01-12 Thread Pierre R.
Le 12/01/2021 à 17:35, Ilija Tovilo a écrit : Hi Marco On Tue, Jan 12, 2021 at 5:19 PM Marco Pivetta wrote: On Mon, Jan 11, 2021, 15:29 Nikita Popov wrote: Hi internals, I would like to present a draft RFC for allowing object keys in arrays: https://wiki.php.net/rfc/object_keys_in_arrays

Re: [PHP-DEV] [RFC] Allow object keys in arrays

2021-01-12 Thread Larry Garfield
On Tue, Jan 12, 2021, at 11:53 AM, Andreas Leathley wrote: > On 12.01.21 17:51, Marco Pivetta wrote: > > Code written to deal with `array` in a generic way will no longer work > > when > > invoked through code paths that produce object keys: this is a general > > problem with widening types overall

Re: [PHP-DEV] [RFC] Allow object keys in arrays

2021-01-12 Thread Andreas Leathley
On 12.01.21 17:51, Marco Pivetta wrote: Code written to deal with `array` in a generic way will no longer work when invoked through code paths that produce object keys: this is a general problem with widening types overall, and is a clear BC break. If you look at levels of BC break, this is on

Re: [PHP-DEV] [RFC] Allow object keys in arrays

2021-01-12 Thread Marco Pivetta
Separate response for this one, sorry for the noise: On Tue, Jan 12, 2021, 17:35 Ilija Tovilo wrote: > Note that even minor PHP versions have historically not followed strict > semantic versioning. If we did, most PHP features would have to be pushed > back years given PHPs relatively slow relea

Re: [PHP-DEV] [RFC] Allow object keys in arrays

2021-01-12 Thread Marco Pivetta
Hey Ilija, On Tue, Jan 12, 2021, 17:35 Ilija Tovilo wrote: > > Definitely disagree here. Your existing code will continue to work fine > without changes. > Code written to deal with `array` in a generic way will no longer work when invoked through code paths that produce object keys: this is a

Re: [PHP-DEV] [RFC] Allow object keys in arrays

2021-01-12 Thread Ilija Tovilo
Hi Marco On Tue, Jan 12, 2021 at 5:19 PM Marco Pivetta wrote: > On Mon, Jan 11, 2021, 15:29 Nikita Popov wrote: > > > Hi internals, > > > > I would like to present a draft RFC for allowing object keys in arrays: > > https://wiki.php.net/rfc/object_keys_in_arrays > > Overall, this is something I

Re: [PHP-DEV] "TryX" idom for Enumerations

2021-01-12 Thread Larry Garfield
On Tue, Jan 12, 2021, at 10:13 AM, Ben Ramsey wrote: > > On Jan 11, 2021, at 19:09, Mike Schinkel wrote: > > > >> On Jan 11, 2021, at 6:52 PM, Larry Garfield wrote: > >> > >> On Mon, Jan 11, 2021, at 2:27 PM, Ben Ramsey wrote: > On Jan 10, 2021, at 20:09, Larry Garfield wrote: > > >

Re: [PHP-DEV] Re: [RFC] Phasing out Serializable

2021-01-12 Thread Björn Larsson
Den 2021-01-08 kl. 00:23, skrev Björn Larsson: Den 2021-01-06 kl. 17:51, skrev Nikita Popov: On Tue, Dec 15, 2020 at 12:14 AM Björn Larsson mailto:bjorn.x.lars...@telia.com>> wrote: Den 2020-12-07 kl. 16:49, skrev Nikita Popov: > On Mon, Dec 7, 2020 at 3:49 PM Björn Larsson mailt

Re: [PHP-DEV] [RFC] Allow object keys in arrays

2021-01-12 Thread Marco Pivetta
Hi Nikita, On Mon, Jan 11, 2021, 15:29 Nikita Popov wrote: > Hi internals, > > I would like to present a draft RFC for allowing object keys in arrays: > https://wiki.php.net/rfc/object_keys_in_arrays > > The specification in the RFC is incomplete, and primarily focussed on what > impact this has

Re: [PHP-DEV] "TryX" idom for Enumerations

2021-01-12 Thread Ben Ramsey
> On Jan 11, 2021, at 19:09, Mike Schinkel wrote: > >> On Jan 11, 2021, at 6:52 PM, Larry Garfield wrote: >> >> On Mon, Jan 11, 2021, at 2:27 PM, Ben Ramsey wrote: On Jan 10, 2021, at 20:09, Larry Garfield wrote: On Sun, Jan 10, 2021, at 4:40 PM, Mark Randall wrote: > On 10

[PHP-DEV] Re: [RFC] Allow object keys in arrays

2021-01-12 Thread Björn Larsson
Den 2021-01-11 kl. 15:28, skrev Nikita Popov: Hi internals, I would like to present a draft RFC for allowing object keys in arrays: https://wiki.php.net/rfc/object_keys_in_arrays The specification in the RFC is incomplete, and primarily focussed on what impact this has from an internal perspect