[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] add regexp-split

From: Daniel Hartwig
Subject: Re: [PATCH] add regexp-split
Date: Sat, 31 Dec 2011 12:37:30 +0800

On 31 December 2011 11:21, Eli Barzilay <address@hidden> wrote:
>> A good point.  I'm interested to find out the reasoning behind
>> Perl's decision to drop empty strings..  Seems a strange thing to do
>> 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".  And then when you realize that making the function behave
> differently sometimes is a bad idea, but you can't back off from the
> earlier version without breaking a ton of code.  In 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?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]