From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.xemacs.design,gmane.emacs.devel Subject: Re: Rationale for split-string? Date: Sun, 20 Apr 2003 20:59:46 -0400 Sender: xemacs-design-admin@xemacs.org Message-ID: References: <87brz57at2.fsf@tleepslib.sk.tsukuba.ac.jp> <200304171744.h3HHiJCx009215@rum.cs.yale.edu> <87adem27ey.fsf@tleepslib.sk.tsukuba.ac.jp> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1050886862 14201 80.91.224.249 (21 Apr 2003 01:01:02 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Apr 2003 01:01:02 +0000 (UTC) Cc: emacs-devel@gnu.org, xemacs-design@xemacs.org Original-X-From: xemacs-design-admin@xemacs.org Mon Apr 21 03:01:00 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 197Pg2-0003fu-00 for ; Mon, 21 Apr 2003 03:01:00 +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 h3L119M20638; Sun, 20 Apr 2003 21:01:09 -0400 Original-Received: (from turnbull@localhost) by gwyn.tux.org (8.11.6p2/8.9.1) id h3L105Q19567 for xemacs-design-mailman@xemacs.org; Sun, 20 Apr 2003 21:00:05 -0400 Original-Received: (from mail@localhost) by gwyn.tux.org (8.11.6p2/8.9.1) id h3L0xqS19353 for turnbull@tux.org; Sun, 20 Apr 2003 20:59:52 -0400 Original-Received: from fencepost.gnu.org (fencepost.gnu.org [199.232.76.164]) by gwyn.tux.org (8.11.6p2/8.9.1) with ESMTP id h3L0xlM19332; Sun, 20 Apr 2003 20:59:47 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 197Pes-0005NG-00; Sun, 20 Apr 2003 20:59:46 -0400 Original-To: "Stephen J. Turnbull" In-reply-to: <87adem27ey.fsf@tleepslib.sk.tsukuba.ac.jp> (stephen@xemacs.org) 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:2081 gmane.emacs.devel:13304 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13304 I see basically two modes. In one mode you are parsing fields from each of a sequence of records, in which case you want to retain null strings as null values. In the other, you are parsing a (free-form) stream of words, in which case null words (usually) don't exist, so you want to throw away _all_ of the null strings. In fact, all of the whitespace-only strings, too, but those normally won't arise in the common case where SEPARATORS matches contiguous whitespace. I think that makes sense. Does anyone see a counterargument, or a reason why any other behavior is useful? I think we should support both modes, but the token-parser is easy to derive from the field-parser, while it's impossible to do the reverse because the token parser throws away information. I conclude that the field-parser (the XEmacs behavior) is more primitive, and I'd like to call that `split-string', I don't entirely agree. The default case uses strings of whitespace as the separator, and for that case, the only intelligent approach is token-parsing. So the function needs to be able to do token-parsing. This feature therefore may as well also be available for any separator.