Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116571 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 99024 invoked from network); 5 Dec 2021 13:02:25 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 5 Dec 2021 13:02:25 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1E3AC1804AA for ; Sun, 5 Dec 2021 06:02:08 -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=-0.8 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, 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: Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 ; Sun, 5 Dec 2021 06:02:07 -0800 (PST) Received: by mail-wm1-f51.google.com with SMTP id c6-20020a05600c0ac600b0033c3aedd30aso5764802wmr.5 for ; Sun, 05 Dec 2021 06:02:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=8fK2NqaodCmmKUHRqIvpgeawP78WhKScCMtOhq0/Fi8=; b=Js0fAfZ8SF1J0JM+a9y6UIkHjU6+sJcz4oRnNHpetW2ib2J5y7wBMHmxOvxzGrwB8/ euhFB6A9QWftCYKddsITA5HQcnpeUVf4uaWe8pKUXThcsokaua/TtUE1N03PPGSstEMM wPhvYxsixcSiISZXCmmb5np3sTJx3I+/xaAXU/I3Ef5KW/V7yBjKZ+7Bb03vPKpVqxba dVceOhsCdvfMtjMEtTbEDYulm6309N7Ele5fvdeMWOouFZxdXVOLNrzocDfCCtwtjetS aUpv8UT7uz/jIi5vL0+sgVcp4ejshhXJvRx7V47m4o+R92SxhsW0E5VSuYnTu+7XSliq NRGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=8fK2NqaodCmmKUHRqIvpgeawP78WhKScCMtOhq0/Fi8=; b=6QjXqrunPvpsFwyWjG3RwwokmLFa0CUbu+fISnTEQmTokfzi40YBVoi4uXIwCQYzOS pjYVLFWzQRm7yHCweWlA0P4loItGl6gWJYELbWIDEOokv2CgcseRpxxuXxfnueb8/XCQ vid4g6fCvFK0c8T6Gk7TIGywrf/2VmlCHyisLBVkOp/OITKhYSYz68eiplAUS87jdMOE 16Bb/zWxkwhK87S3U3uxGrh/q2xwr5aOwMfR0lD/LCGj1pbWb9YwIU7v/fYxNTi/37EL t0SqhQE2EXJaAn+UYP0jih9BJNFDOJ7PXj/wBhk2zEnLt0QeD+N5YB2KEPlqzV/aIkGm NCAw== X-Gm-Message-State: AOAM530hZ0GTQDDDYG8WfPlVnhacOvX5xnokrXKVQfavkD40crUHNQFV mciobql7Uyyne9DS+PlmzMiZ7ifXvw0= X-Google-Smtp-Source: ABdhPJzaO89qhD2TG0XKQXNYu9Yaf2ETQC6uF13yQGDCqmg9apZ9IOSXy9jWLxgSeY4yXQzUfmu6iQ== X-Received: by 2002:a05:600c:19cc:: with SMTP id u12mr31328646wmq.24.1638712926157; Sun, 05 Dec 2021 06:02:06 -0800 (PST) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id b15sm10556994wri.62.2021.12.05.06.02.05 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Dec 2021 06:02:05 -0800 (PST) Message-ID: Date: Sun, 5 Dec 2021 14:02:03 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Content-Language: en-GB To: internals@lists.php.net References: <61ac9759.1c69fb81.b0241.1e6fSMTPIN_ADDED_MISSING@mx.google.com> In-Reply-To: <61ac9759.1c69fb81.b0241.1e6fSMTPIN_ADDED_MISSING@mx.google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC [Discussion] array_column results grouping From: rowan.collins@gmail.com (Rowan Tommins) 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]