From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Hartwig Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] add regexp-split Date: Sat, 31 Dec 2011 12:37:30 +0800 Message-ID: References: <4EFD8F08.7070303@gentoo.org> <4EFDA50F.1070704@gentoo.org> <4EFDBB56.7020004@gentoo.org> <20222.29745.499607.16934@winooski.ccs.neu.edu> <20222.32678.878097.893104@winooski.ccs.neu.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1325306267 5485 80.91.229.12 (31 Dec 2011 04:37:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 31 Dec 2011 04:37:47 +0000 (UTC) Cc: guile-devel To: Eli Barzilay Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Dec 31 05:37:36 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RgqhM-0008WD-JI for guile-devel@m.gmane.org; Sat, 31 Dec 2011 05:37:36 +0100 Original-Received: from localhost ([::1]:36709 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgqhM-0007Y6-4G for guile-devel@m.gmane.org; Fri, 30 Dec 2011 23:37:36 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:53868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgqhJ-0007Xp-I5 for guile-devel@gnu.org; Fri, 30 Dec 2011 23:37:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RgqhI-00071R-7s for guile-devel@gnu.org; Fri, 30 Dec 2011 23:37:33 -0500 Original-Received: from mail-iy0-f169.google.com ([209.85.210.169]:52040) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RgqhI-00071L-1z for guile-devel@gnu.org; Fri, 30 Dec 2011 23:37:32 -0500 Original-Received: by iacb35 with SMTP id b35so28629117iac.0 for ; Fri, 30 Dec 2011 20:37:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=Xx8jhOQ/uscBW2QEDxV0+SPP8RU5mo9mpoAsnkBSFzQ=; b=S1L5f3sKvb1agGdohFEpm/HPcN9RN4lrdfiJeEMA1VHUMWVUZte94ThJjs0wp05xxX N7rzGILU/UYnO6z+VHzn8rrYV3Hx9J68UD9CdlnqkB47FVjndmDgsuYmIdBM6zNUZ6mb 81mxNZICcXuv3S1Zw3BG2rn9TkMeSIKnGYaVA= Original-Received: by 10.50.190.196 with SMTP id gs4mr49255005igc.14.1325306251051; Fri, 30 Dec 2011 20:37:31 -0800 (PST) Original-Received: by 10.231.48.68 with HTTP; Fri, 30 Dec 2011 20:37:30 -0800 (PST) In-Reply-To: <20222.32678.878097.893104@winooski.ccs.neu.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.210.169 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:13220 Archived-At: On 31 December 2011 11:21, Eli Barzilay wrote: >> A good point. =C2=A0I'm interested to find out the reasoning behind >> Perl's decision to drop empty strings.. =C2=A0Seems a strange thing to d= o >> IMO. > > I think that there's a general tendency to make things "nice" and > dropping these things for cases where what the user wants is > "obvious". =C2=A0And then when you realize that making the function behav= e > differently sometimes is a bad idea, but you can't back off from the > earlier version without breaking a ton of code. =C2=A0In any case, look > also at the Emacs solution of an optional argument to drop all empty > strings, with a weird behavior when no regexp is given... In Scheme it is easy for the user to remove the empty strings if desired. In Perl I'd say that this at least involves writing a loop each time, hence their choice for the default "nice" behaviour. The ease of using `filter' is a good case for keeping the empty strings in Scheme version. I could not find any mention of this optional Emacs arg. you talk about; have a pointer for me?