Re: [PHP-DEV] [RFC] [Discussion] Add new function `array_group`

2023-05-31 Thread naitsirch
Am 30-May-2023 18:34:19 +0200 schrieb andr...@dqxtech.net: > On Tue, 30 May 2023 at 18:27, Boro Sitnikovski wrote: > > > > Hi, > > > > Thank you for your thoughts. > > > > > I would say the more common desired behavior is the one in your first > > > example. And even for that we don't have a nat

Re: [PHP-DEV] [RFC] [Discussion] Add new function `array_group`

2023-05-31 Thread Aleksander Machniak
On 30.05.2023 13:34, Boro Sitnikovski wrote: I propose introducing a function to PHP core named `array_group`. This function takes an array and a function and returns an array that contains arrays - groups of consecutive elements. This is very similar to Haskell's `groupBy` function

Re: [PHP-DEV] [RFC] [Discussion] Add new function `array_group`

2023-05-31 Thread Rokas Šleinius
On Wed, 31 May 2023 at 10:30, Aleksander Machniak wrote: > > On 30.05.2023 13:34, Boro Sitnikovski wrote: > > I propose introducing a function to PHP core named `array_group`. This > > function takes an array and a function and returns an array that > > contains arrays - groups of consecutive elem

Re: [PHP-DEV] [RFC] Define proper semantics for range() function

2023-05-31 Thread G. P. B.
Hello Internals, Round 2, I'm planning to open voting tomorrow, the only change being is handling of string digits to behave like doing an ASCII string range: https://wiki.php.net/rfc/proper-range-semantics Any final comments or complaints should be raised now. Best regards, George P. Banyard

[PHP-DEV] [RFC] Deprecate remains of string evaluated code assertions

2023-05-31 Thread G. P. B.
Hello internals, I would like to start the discussion about deprecating various remains from the now removed string code evaluated assertions functionality of assert(). The RFC is located on the wiki at the following address: https://wiki.php.net/rfc/assert-string-eval-cleanup Initially, this wa

Re: [PHP-DEV] Declaration-aware attributes

2023-05-31 Thread Benjamin Außenhofer
On Tue, May 30, 2023 at 2:49 AM Andreas Hennings wrote: > Hello internals, > I am picking up an idea that was mentioned by Benjamin Eberlei in the past. > https://externals.io/message/110217#110395 > (we probably had the idea independently, but Benjamin's is the first > post where I see it mentio

Re: [PHP-DEV] [RFC] [Discussion] Add new function `array_group`

2023-05-31 Thread mickmackusa
As an answerer and curator of many [php][arrays][grouping] tagged questions on Stack Overflow for several years, I'd like to mention that developers' non-SQL grouping needs are much more nuanced than merely defining group qualification and creating subarrays. Often devs will want to sum, count (in

Re: [PHP-DEV] [RFC] [Discussion] Add new function `array_group`

2023-05-31 Thread Boro Sitnikovski
> On 31.5.2023, at 09:03, naitsi...@e.mail.de wrote: > > > > Am 30-May-2023 18:34:19 +0200 schrieb andr...@dqxtech.net: >> On Tue, 30 May 2023 at 18:27, Boro Sitnikovski wrote: >>> >>> Hi, >>> >>> Thank you for your thoughts. >>> I would say the more common desired behavior is the on

Re: [PHP-DEV] [RFC] Deprecate remains of string evaluated code assertions

2023-05-31 Thread Claude Pache
> Le 31 mai 2023 à 14:08, G. P. B. a écrit : > > Hello internals, > > I would like to start the discussion about deprecating various remains from > the now removed string code evaluated assertions functionality of assert(). > > The RFC is located on the wiki at the following address: > https:

Re: [PHP-DEV] [RFC] Deprecate remains of string evaluated code assertions

2023-05-31 Thread Claude Pache
> Le 1 juin 2023 à 00:20, Claude Pache a écrit : > > Another point: Your RFC is missing `assert.quiet_eval`... > (In fact, it is probable that the `assert.quiet_eval` ini setting and the ASSERT_QUIET_EVAL constant have been removed in PHP 8, but that the documentation has not been updated.)

[PHP-DEV] Re: [RFC] [Discussion] Add new function `array_group`

2023-05-31 Thread Boro Sitnikovski
On 30.5.2023, at 15:13, Boro Sitnikovski wrote:Updated the patch: added a test about increasing subsequences example, and a minor bugfix.On 30.5.2023, at 13:34, Boro Sitnikovski wrote:Hello all,As per the How To Create an RFC instructions, I am sending this e-mail in order to get your feedback on

Re: [PHP-DEV] Re: [RFC] [Discussion] Add new function `array_group`

2023-05-31 Thread Larry Garfield
On Wed, May 31, 2023, at 10:47 PM, Boro Sitnikovski wrote: > 1. The grouping that JavaScript/.NET/Lodash/Scala/etc. do (this should > be the default of `array_group`) > 2. The grouping that Haskell does, the one I proposed earlier (this can > be altered in a flag within `array_group`) > > Based

Re: [PHP-DEV] [RFC] [Discussion] Add new function `array_group`

2023-05-31 Thread Boro Sitnikovski
> On 1.6.2023, at 00:59, Larry Garfield wrote: > > On Wed, May 31, 2023, at 10:47 PM, Boro Sitnikovski wrote: > >> 1. The grouping that JavaScript/.NET/Lodash/Scala/etc. do (this should >> be the default of `array_group`) >> 2. The grouping that Haskell does, the one I proposed earlier (this

Re: [PHP-DEV] [RFC] [Discussion] Add new function `array_group`

2023-05-31 Thread Levi Morrison via internals
On Tue, May 30, 2023 at 5:35 AM Boro Sitnikovski wrote: > > Hello all, > > As per the How To Create an RFC instructions, I am sending this e-mail in > order to get your feedback on my proposal. > > I propose introducing a function to PHP core named `array_group`. This > function takes an array a

Re: [PHP-DEV] [RFC] [Discussion] Add new function `array_group`

2023-05-31 Thread Boro Sitnikovski
> On 1.6.2023, at 01:13, Levi Morrison wrote: > > On Tue, May 30, 2023 at 5:35 AM Boro Sitnikovski wrote: >> >> Hello all, >> >> As per the How To Create an RFC instructions, I am sending this e-mail in >> order to get your feedback on my proposal. >> >> I propose introducing a function t