Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64968 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8552 invoked from network); 15 Jan 2013 07:16:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jan 2013 07:16:26 -0000 Authentication-Results: pb1.pair.com header.from=mjpelmear@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=mjpelmear@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.53 as permitted sender) X-PHP-List-Original-Sender: mjpelmear@gmail.com X-Host-Fingerprint: 209.85.160.53 mail-pb0-f53.google.com Received: from [209.85.160.53] ([209.85.160.53:37466] helo=mail-pb0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EE/80-00917-94205F05 for ; Tue, 15 Jan 2013 02:16:26 -0500 Received: by mail-pb0-f53.google.com with SMTP id jt11so2677196pbb.26 for ; Mon, 14 Jan 2013 23:16:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=9U2hdzf6yLzOXu2vyabv7V0VQlosvZnrFMgukrVt3ls=; b=QJgFHu6okoNs7f1Syd5NkAyTpQT4cH9ieRALb9kSI7KSSj9Ag9me0B0NrKjBNnXx+E xGgNWusDB0bGDqDj5dZlYuoB+DLD/sbuKrm22ibZHjobGAOFjxMqD2ek9uI/UgAQ3l+3 qOJBROZ+mkLhNe/XbWfQzjGNmxKdDQBNBqRGTmSwmpLPLmvcjVHdgcQAIEzUfbAbKTkU PJHKnAPmKtDIO/hKxOYeAnhtxXyihB2QfYyh0RPtiVgcCixTCLu5hEhab6STaIFLIkYo r2eThHi3VEvChNoFnwc1hjscGV1t6tDvsn23hRVatFCW8zsuL2M2RaWxRaQnaUy2OzkW 5zOQ== X-Received: by 10.68.220.198 with SMTP id py6mr263458634pbc.119.1358234183041; Mon, 14 Jan 2013 23:16:23 -0800 (PST) Received: from [192.168.1.123] (cpe-98-154-250-197.socal.res.rr.com. [98.154.250.197]) by mx.google.com with ESMTPS id ix9sm9710750pbc.7.2013.01.14.23.16.20 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Jan 2013 23:16:21 -0800 (PST) Message-ID: <50F50243.2090409@gmail.com> Date: Mon, 14 Jan 2013 23:16:19 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: Herman Radtke CC: internals@lists.php.net References: <50F4802C.5070003@php.net> <42E0BBCF-074E-493C-9FEA-CE87EE21CE7D@strojny.net> <50F49AD7.70409@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [VOTE] array_column() function From: mjpelmear@gmail.com (Matt Pelmear) On 01/14/2013 10:12 PM, Herman Radtke wrote: >> If it is called "array_pluck" it should remove the data in question from the >> original array. (I'm not saying that is a desirable feature here, I'm just >> saying that makes more sense based on the meaning of the name you seem to >> prefer.) > Why do you think pluck is destructive? In most examples I have come > across it merely 'plucks' a certain key from a dictionary and does so > in a way that does not modify the original dictionary. > > Sources: > Underscore.js - http://documentcloud.github.com/underscore/#pluck > Rails - http://apidock.com/rails/ActiveRecord/Calculations/pluck > Python example: http://stackoverflow.com/questions/9816545/pluck-in-python > Sources: 1. google: "define: pluck" "Take hold of (something) and quickly *remove* it from it's place" 2. http://www.merriam-webster.com/dictionary/pluck "to pull or *pick* off or *out*" 3. http://www.thefreedictionary.com/pluck "To *remove* or detach ..." Emphasis added. The connotation of the word is that something is *removed* from it's original place. Just because other languages/frameworks have made a poor naming choices doesn't mean PHP should too. In this case, there is already an alternatively proposed method name which is more obvious way to name the method that fits within the established PHP conventions. I'm picky about naming things. :-) -Matt