Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116572 Return-Path: <7snovic@gmail.com> Delivered-To: mailing list internals@lists.php.net Received: (qmail 52472 invoked from network); 6 Dec 2021 07:45:10 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 Dec 2021 07:45:10 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CD9681804A8 for ; Mon, 6 Dec 2021 00:45:03 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: <7snovic@gmail.com> Received: from mail-il1-f171.google.com (mail-il1-f171.google.com [209.85.166.171]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 6 Dec 2021 00:45:03 -0800 (PST) Received: by mail-il1-f171.google.com with SMTP id i6so9494193ila.0 for ; Mon, 06 Dec 2021 00:45:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ict/DhtdmIUrjju7AQDA6EXmoVirq4qXblET2hYV4wE=; b=hKanls6B8T5XO3eL1JLuju7q1vTU0OPHdntbpVHsh+0DxacW1ZBCKwCVAcnO41qECC 3cqWg97smsvrp199Mgkso7s8B9+FzmqqUXQz5C7omB29xCwiHKcsSpGHgQl9xuMhNCJe tC3aIMGtdeQZHUulvyZc7KFRV4kDqBywkYt+KSFB5Q4eO2nCvfYo5T5C+doBSX85Q2KO hbuFy/nHMmUOlddI35HuF5OW5+DfEz7V7p02FF3KCpRz8ZiGGNhlXx4bA9aCMyhtRq36 QlFHoYDXCsDksvgQFx7eo9iwCcr2vfwm34fcLSkBlkJynMoVdT0sMeLQrQcjVqDNhNLN VbdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ict/DhtdmIUrjju7AQDA6EXmoVirq4qXblET2hYV4wE=; b=646Q9f+FWIEqVo7zalvgmYgMUT9DPL1YhJDSIWpo/jOEX5EPiFP2DB5o/1EdlEQv3c +tMt7YPkzn5rJzM19Gj4vQk+1Uv+MfiMEViK9EH5I1G+sIwMjPeL4pbcbhxI3D7hoeKe NND115NqUXCiwvJEpNRSIiFoqkhBrBFyPrQYcg958DpSUB8ORBcc9Lum2ETVXL1wL6+t AzMcXPZS9YlkCP4CNifB+cA8jb08ZsK60v9gEVQXbGWK0qO2vPjMOPGznjBGgROYNutD ocoTOA8SbxSim9s7n9VE/DqoFD56qqtGvQYKHrWvY6/+r8NfSBOt9HGRmmxsuEO1cjDR UmSg== X-Gm-Message-State: AOAM530cERbn0iAjgaj1ISU3JEl1JMi9CRvUTuAJ0jM93u61lEYHQdHX dzu48+HnBk1PRaNyMDw/nXT6mHKG9/VLdWROEV8= X-Google-Smtp-Source: ABdhPJw2vM8UwoeCD2n0k0ZdJTax5/UuhfB71LfdWYtlhs+kR+iXG+YEpyyKyRIBwhz35PdGfPb+o+CtE+U5JCkQztI= X-Received: by 2002:a05:6e02:1a83:: with SMTP id k3mr31198651ilv.278.1638780302617; Mon, 06 Dec 2021 00:45:02 -0800 (PST) MIME-Version: 1.0 References: <61ac9759.1c69fb81.b0241.1e6fSMTPIN_ADDED_MISSING@mx.google.com> In-Reply-To: Date: Mon, 6 Dec 2021 10:44:51 +0200 Message-ID: To: Rowan Tommins Cc: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] RFC [Discussion] array_column results grouping From: 7snovic@gmail.com (Hassan Ahmed) Hello Folks, Thanks a lot for your feedback, as already mentioned in the RFC and as mentioned by Rowan too a new function is an option. I think that mostly we will go with the new function option. I will try to edit the PR to add a new function, does there any suggestions/naming conventions for the new function? a colleague suggested being `array_group_by` and Hendra already suggested to be `array_column_group` which is good too. Regards, Hassan On Sun, Dec 5, 2021 at 4:02 PM Rowan Tommins wrote: > > On 05/12/2021 10:41, Mark Randall wrote: > > On 04/12/2021 14:21, Marco Pivetta wrote: > >> Gonna vote `no` on this: please design new/dedicated functions, > >> rather than > >> expanding optional parameters. > > > > > > I would vote no for the same reason. > > > Since this is explicitly an open question in the current RFC draft, it > seems a bit premature to talk about voting, rather than encouraging the > RFC to develop in a particular direction. > > For what it's worth, I agree that a new function is probably better > here, because the argument list of array_column is already quite > complicated. A new function also leaves the way open to add more > functionality, such as the "reducer" callback suggested by Hendra > Gunawan; I don't think that's needed in the first implementation, though. > > In general, I like the proposal - like array_column itself, it's one of > those things that's fairly _simple_ to do in userland, but also fairly > _often_ done, so compacting it to a neat function call seems useful. > > Regards, > > -- > Rowan Tommins > [IMSoP] > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php >