[Top][All Lists]

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

Re: [PATCH] add regexp-split

From: Eli Barzilay
Subject: Re: [PATCH] add regexp-split
Date: Fri, 30 Dec 2011 22:21:10 -0500

Just now, Daniel Hartwig wrote:
> On 31 December 2011 10:32, Eli Barzilay <address@hidden> wrote:
> > 40 minutes ago, Daniel Hartwig wrote:
> >>
> >> I think Racket does the right thing by keeping *all* the empty
> >> strings in place.
> >
> > Well, I do think that Perl (as well as other libraries &
> > languages) are a good reference point to compare against...  If
> > anything, you should at least be aware of other design choices and
> > why you went in a different direction.  (And we did not follow
> > perl in all aspects, as those tests clarify.)
> 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...

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                             Maze is Life!

reply via email to

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