Return-Path: X-Original-To: apmail-spark-user-archive@minotaur.apache.org Delivered-To: apmail-spark-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B655D10C81 for ; Thu, 27 Feb 2014 12:37:24 +0000 (UTC) Received: (qmail 28747 invoked by uid 500); 27 Feb 2014 12:37:23 -0000 Delivered-To: apmail-spark-user-archive@spark.apache.org Received: (qmail 28721 invoked by uid 500); 27 Feb 2014 12:37:22 -0000 Mailing-List: contact user-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@spark.apache.org Delivered-To: mailing list user@spark.apache.org Received: (qmail 28713 invoked by uid 99); 27 Feb 2014 12:37:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Feb 2014 12:37:20 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dechouxb@gmail.com designates 209.85.215.49 as permitted sender) Received: from [209.85.215.49] (HELO mail-la0-f49.google.com) (209.85.215.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Feb 2014 12:37:15 +0000 Received: by mail-la0-f49.google.com with SMTP id mc6so1613111lab.36 for ; Thu, 27 Feb 2014 04:36:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=p86SOmoRbvukZGRq72BalvmT/+SeI5IJbQ63qItGPIw=; b=eSmH2lAi5cskkZi+4lEfntwnR3r2ZGIGw+6kWLSlBY655t0R6rRjCmRWiRs3YC8Mf3 8i2kXduKI0I0ne0pSDSpd+yBPxa+0TMn8WBvVvwSGqYHlJ2W3A/9Bc0gl/2RCgY6knu8 pPcg36/7mXC7/aDYCCwQQmiXlygR8PY7HJoedDnegIi+Aq32kDMYnp2ZoN4fxh6zfJSD 0GLRaWvzs51yyTaiVyqL8e+QGJolIV0CUW3E1p3I4KetPjv9tA/9VO6pxjKSPFjHEQKq Fc+w3tpun70Rcf5fepG3JNZbIm8P63GtVajJaiopCGH0FJQKt5QHgVbYTTQrVevHjPqW pa1w== MIME-Version: 1.0 X-Received: by 10.112.57.80 with SMTP id g16mr6249876lbq.26.1393504613524; Thu, 27 Feb 2014 04:36:53 -0800 (PST) Received: by 10.112.125.165 with HTTP; Thu, 27 Feb 2014 04:36:53 -0800 (PST) Date: Thu, 27 Feb 2014 13:36:53 +0100 Message-ID: Subject: Rename filter() into keep(), remove() or take() ? From: Bertrand Dechoux To: user@spark.apache.org Content-Type: multipart/alternative; boundary=001a1133b0947b69a204f362933b X-Virus-Checked: Checked by ClamAV on apache.org --001a1133b0947b69a204f362933b Content-Type: text/plain; charset=ISO-8859-1 Hi, It might seem like a trivial issue but even though it is somehow a standard name filter() is not really explicit in which way it does work. Sure, it makes sense to provide a filter function but what happens when it returns true? Is the current element removed or kept? It is not really obvious. Has another name been already discussed? It could be keep() or remove(). But take() could also be reused and instead of providing a number, the filter function could be requested. Regards Bertrand --001a1133b0947b69a204f362933b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,

It might seem like a trivial issue but even though it i= s somehow a standard name filter() is not really explicit in which way it d= oes work. Sure, it makes sense to provide a filter function but what happen= s when it returns true? Is the current element removed or kept? It is not r= eally obvious.

Has another name been already discussed? It could be ke= ep() or remove(). But take() could also be reused and instead of providing = a number, the filter function could be requested.

Regards

Bertrand
--001a1133b0947b69a204f362933b--