From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.xemacs.design,gmane.emacs.devel Subject: Re: Rationale for split-string? Date: Thu, 17 Apr 2003 14:32:41 -0500 (CDT) Sender: xemacs-design-admin@xemacs.org Message-ID: <200304171932.h3HJWfS08739@eel.dms.auburn.edu> References: <87brz57at2.fsf@tleepslib.sk.tsukuba.ac.jp> <200304171744.h3HHiJCx009215@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1050608305 11931 80.91.224.249 (17 Apr 2003 19:38:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 17 Apr 2003 19:38:25 +0000 (UTC) Cc: stephen@xemacs.org, emacs-devel@gnu.org, xemacs-design@xemacs.org Original-X-From: xemacs-design-admin@xemacs.org Thu Apr 17 21:38:20 2003 Return-path: Original-Received: from gwyn.tux.org ([199.184.165.135]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 196F96-0002nd-00 for ; Thu, 17 Apr 2003 21:34:09 +0200 Original-Received: from gwyn.tux.org (localhost.localdomain [127.0.0.1]) by gwyn.tux.org (8.11.6p2/8.9.1) with ESMTP id h3HJY2M16408; Thu, 17 Apr 2003 15:34:03 -0400 Original-Received: (from turnbull@localhost) by gwyn.tux.org (8.11.6p2/8.9.1) id h3HJXJx16049 for xemacs-design-mailman@xemacs.org; Thu, 17 Apr 2003 15:33:19 -0400 Original-Received: (from mail@localhost) by gwyn.tux.org (8.11.6p2/8.9.1) id h3HJX8A15946 for turnbull@tux.org; Thu, 17 Apr 2003 15:33:08 -0400 Original-Received: from manatee.dms.auburn.edu (manatee.dms.auburn.edu [131.204.53.104]) by gwyn.tux.org (8.11.6p2/8.9.1) with ESMTP id h3HJX7M15936; Thu, 17 Apr 2003 15:33:08 -0400 Original-Received: from eel.dms.auburn.edu (eel.dms.auburn.edu [131.204.53.108]) by manatee.dms.auburn.edu (8.12.9/8.12.9) with ESMTP id h3HJWeoc012909; Thu, 17 Apr 2003 14:32:40 -0500 (CDT) Original-Received: (from teirllm@localhost) by eel.dms.auburn.edu (8.11.6+Sun/8.11.6) id h3HJWfS08739; Thu, 17 Apr 2003 14:32:41 -0500 (CDT) X-Authentication-Warning: eel.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: monnier+gnu/emacs@rum.cs.yale.edu In-reply-to: <200304171744.h3HHiJCx009215@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu) X-XEmacs-List: design Errors-To: xemacs-design-admin@xemacs.org X-BeenThere: xemacs-design@xemacs.org X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Discussion of design and features for XEmacs. List-Unsubscribe: , Xref: main.gmane.org gmane.emacs.xemacs.design:2047 gmane.emacs.devel:13268 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13268 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 heuristic. Sincerely, Luc.