emacs-devel
[Top][All Lists]
Advanced

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

Re: Rationale for split-string?


From: Stefan Monnier
Subject: Re: Rationale for split-string?
Date: Fri, 18 Apr 2003 10:17:45 -0400

> I tend to agree, but remember Larry Wall does not.  That concerns me;
> Larry is nothing if not remarkably good at intuiting what works.  And
> the (delete "" (split-string ...))  idiom is hardly an exercise in
> perversion or a brainteaser.

I don't think it has much to do with intuition.
He just had in mind splitting entries in /etc/passwd or tab-separated
fields or somesuch whereas Emacs coders wanted the function to extract
a list of words out of a string.
As I said, the XEmacs behavior is more regular and probably preferable.

>     Stefan> A gross hack is to test if the last char of the regexp is
>     Stefan> ?+ and if so get rid of empty strings at start and end.
>     Stefan> It should take care of 99% of the cases.
> 
> That's an implementation, not a specification.  Using that means we'll
> be having this discussion again, sooner or later.  Think about someone

Why do people assume that I'd want gross hacks in Emacs's code ?


        Stefan





reply via email to

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