Re: [PHP-DEV] RFC: Add `final class Vector` to PHP

2021-09-18 Thread Mike Schinkel
Hi Tyson, Thanks for the reply. > On Sep 18, 2021, at 7:26 PM, tyson andre wrote: > > Hi Mike Schinkel, > >> Given there seems to be a lot of concern about the approach the RFC proposes >> would it not address the concerns about memory usage and performance if >> several methods were added t

Re: [PHP-DEV] RFC: Add `final class Vector` to PHP

2021-09-18 Thread Mike Schinkel
Hi Larry, > On Sep 18, 2021, at 12:03 PM, Larry Garfield wrote: > > Rather than go point by point, I'm going to respond globally here. > > I am frequently on-record hating on PHP arrays, and stating that I want > something better. The problems with PHP arrays include: > > 1. They're badly pe

Re: [PHP-DEV] RFC: Add `final class Vector` to PHP

2021-09-18 Thread tyson andre
Hi Mike Schinkel, > Given there seems to be a lot of concern about the approach the RFC proposes > would it not address the concerns about memory usage and performance if > several methods were added to SplFixedArray instead (as well as functions > like indexOf(), contains(), map(), filter(), J

Re: [PHP-DEV] RFC: Add `final class Vector` to PHP

2021-09-18 Thread Matthew Brown
On Sat, 18 Sept 2021 at 12:04, Larry Garfield wrote: > > I am frequently on-record hating on PHP arrays, and stating that I want > something better. The problems with PHP arrays include: > > 1. They're badly performing (because they cannot be optimized) > 2. They're not type safe > 3. They're mu

Re: [PHP-DEV] RFC: Add `final class Vector` to PHP

2021-09-18 Thread tyson andre
Hi Larry Garfield, > Rather than go point by point, I'm going to respond globally here. > > I am frequently on-record hating on PHP arrays, and stating that I want > something better.  The problems with PHP arrays include: > > 1. They're badly performing (because they cannot be optimized) > 2.

Re: [PHP-DEV] RFC: Add `final class Vector` to PHP

2021-09-18 Thread Pierre Joye
Hi Tyson, On Sat, Sep 18, 2021, 10:46 PM tyson andre wrote: > Hi Peter Bowyer, > > > Many of php's names are based on the naming choices in libraries made in > C/C++. > So using https://cplusplus.com/reference/vector/vector/ for my RFC > https://wiki.php.net/rfc/vector > seems like the most natu

Re: [PHP-DEV] RFC: Add `final class Vector` to PHP

2021-09-18 Thread Larry Garfield
On Fri, Sep 17, 2021, at 8:49 PM, tyson andre wrote: > > > Improving collection/set operations in PHP is something near and dear to my > > heart, > > so I'm in favor of adding a Vector class or similar to the stdlib. > > > > However, I am not a fan of this particular design. > > > > As Levi not

Re: [PHP-DEV] RFC: Add `final class Vector` to PHP

2021-09-18 Thread tyson andre
Hi Peter Bowyer, > > > To echo Pierre, a Vector needs to be of a single guaranteed type. > > > Yes, this gets us back to the generics conversation again, but I presume > > (perhaps naively?) there are ways to address this question without getting > > into full-blown generics. > > > > Yep, as you s

Re: [PHP-DEV] Make strtolower/strtoupper just do ASCII

2021-09-18 Thread tyson andre
Hi Tim Starling,   > I would like to know if a patch to make strtolower and strtoupper do > plain ASCII case conversion would be accepted, or if an RFC should be > created. > > The situation with case conversion is inconsistent. > > The following functions do ASCII case conversion: strcasecmp, >

Re: [PHP-DEV] RFC: Add `final class Vector` to PHP

2021-09-18 Thread Peter Bowyer
On Sat, 18 Sept 2021 at 02:49, tyson andre wrote: > > To echo Pierre, a Vector needs to be of a single guaranteed type. > > Yes, this gets us back to the generics conversation again, but I presume > (perhaps naively?) there are ways to address this question without getting > into full-blown gener