[Top][All Lists]

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

Re: Rationale for split-string?

From: Luc Teirlinck
Subject: Re: Rationale for split-string?
Date: Thu, 17 Apr 2003 14:32:41 -0500 (CDT)

Stefan Monnier wrote:

   A gross hack is to test if the last char of the regexp is ?+
   and if so get rid of empty strings at start and end.
   It should take care of 99% of the cases.

If you can not decide which of the two types of behavior is more
useful, would it not be more logical to have the behavior depend on
some optional new argument with the old behavior the default, so that
no existing code gets broken?  Gross hacks that "should" take care of
99% of the cases usually turn out to take care of something that looks
more like 66% or even 50%.  Making the behavior depend on the last
character of the regexp just looks like a very messy imprecise



reply via email to

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