Re: [PHP-DEV] Typed array properties V2

2020-01-17 Thread tyson andre
> I have a PR that reduces the [minimum capacity of a packed array from 8] to > 2, noticeably decreasing memory - > the largest blockers were getting a realistic idea of whether commonly used > applications > would see a decrease or increase in runtime, and needing code review. Sorry, I forgot

Re: [PHP-DEV] Typed array properties V2

2020-01-17 Thread tyson andre
> I'm unsure of exactly how this might work so defer to an Internals export, > but having previously read @Nikita Popov 's great > post on PHP's arrays, I did wonder if by knowing the data type within an > array and that it'd conform to a strict structure, could the array itself > be stored in an a

Re: [PHP-DEV] Typed array properties V2

2020-01-17 Thread Aran Reeks
Hi Mike, Thanks for your support, and yes, you're correct, I did mean to structure the type prior to the []. I'm unsure of exactly how this might work so defer to an Internals export, but having previously read @Nikita Popov 's great post on PHP's arrays, I did wonder if by knowing the data type

Re: [PHP-DEV] Typed array properties V2

2020-01-17 Thread Mike Schinkel
> On Jan 17, 2020, at 2:50 AM, Aran Reeks wrote: > That said, there's a common use case that keeps me going back to them which > I think would be a good thing for PHP to try and solve as a language > feature - better typing of arrays to type their properties. I for one would be a big +1 for thi

RE: [PHP-DEV] Warn when declaring required parameter afteroptionalone

2020-01-17 Thread Olumide Samson
Error(in PHP 8) after warning or deprecation in 7.xnything more preferred… --- Sent from Mail for Windows 10 From: Olumide Samson Sent: Saturday, January 11, 2020 2:42 PM To: Niklas Keller; Nikita Popov Cc: Bob Weinand; PHP internals Subject: RE: [PHP-DEV] Warn when declaring required parameter a

[PHP-DEV] Request for RFC karma wiki account

2020-01-17 Thread Aran Reeks
Hi all, After the feedback on 'Typed array properties V2', I'd like to start fleshing out an RFC for which I understand Karma must be granted by @PHP internals Many thanks, Aran

Re: [PHP-DEV] Warn when declaring required parameter after optional one

2020-01-17 Thread Aran Reeks
Hi all, Whilst I totally see the benefits of this, I'm not sure if this is a job for PHP itself, rather a coding standard enforced optionally by something like PHPCS. It's certainly a bad practice, but I'm not sure the benefit will be worth the refactors required. I feel we might be an interestin

Re: [PHP-DEV] Warn when declaring required parameter after optional one

2020-01-17 Thread Nikita Popov
On Sat, Jan 11, 2020 at 2:35 PM Niklas Keller wrote: > Hi Nikita, > > while this is a rather small change, it has quite some BC impact, as > not all old code has been adjusted to run on PHP 7.1+ only using > nullable types. > > I'd like to see an RFC with a vote for this. > > Regards, > Niklas >

Re: [PHP-DEV] Typed array properties V2

2020-01-17 Thread Larry Garfield
On Fri, Jan 17, 2020, at 7:53 AM, Robert Hickman wrote: > > So essentially we are talking about generics. I think it's the best time to > > do so... Maybe our wishes come true soon? ;) > > > > Given that the general trend is towards making PHP more statically > typed and very java/C# like, why not

Re: [PHP-DEV] Who are the current eligible voters?

2020-01-17 Thread Ben Ramsey
> On Jan 16, 2020, at 06:47, Aleksander Machniak wrote: > > On 15.01.2020 21:15, Nikita Popov wrote: >> Yes, having a php.net account is sufficient. Additionally there are 28 >> users in the wiki in the "phpcvs" group, which I *think* means they can >> also vote. >> >> Based on master.php.net da

Re: [PHP-DEV] Typed array properties V2

2020-01-17 Thread Olumide Samson
On Fri, Jan 17, 2020, 2:54 PM Robert Hickman wrote: > > So essentially we are talking about generics. I think it's the best time > to > > do so... Maybe our wishes come true soon? ;) > > > > Given that the general trend is towards making PHP more statically > typed and very java/C# like, why not

Re: [PHP-DEV] Typed array properties V2

2020-01-17 Thread Robert Hickman
> So essentially we are talking about generics. I think it's the best time to > do so... Maybe our wishes come true soon? ;) > Given that the general trend is towards making PHP more statically typed and very java/C# like, why not just ditch PHP and use one of the aforementioned languages? -- PH

Re: [PHP-DEV] [RFC] Variable syntax tweaks

2020-01-17 Thread Nikita Popov
On Thu, Jan 16, 2020 at 10:12 AM Claude Pache wrote: > > > > Le 7 janv. 2020 à 11:23, Nikita Popov a écrit : > > > > Hi internals, > > > > I'd like to propose a small RFC, which addresses a few minor issues that > > have not been handled by the original "uniform variable syntax" RFC: > > > > htt

Re: [PHP-DEV] Typed array properties V2

2020-01-17 Thread Máté Kocsis
Hi, So essentially we are talking about generics. I think it's the best time to do so... Maybe our wishes come true soon? ;) Cheers, Máté

Re: [PHP-DEV] Typed array properties V2

2020-01-17 Thread Brent Roose
Hello all It's a much-requested feature for years and years. My first thought was "we need generics, not this" but than I took 5 minutes to actually think about it. While the same, and much more, can be achieved with generics, it's a difficult feature to implement. There have been several RFCs