From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: Unibyte characters, strings, and buffers Date: Fri, 28 Mar 2014 20:42:49 +0900 Message-ID: <871txmpn0m.fsf@uwakimon.sk.tsukuba.ac.jp> References: <831txozsqa.fsf@gnu.org> <83ppl7y30l.fsf@gnu.org> <87r45nouvx.fsf@uwakimon.sk.tsukuba.ac.jp> <8361myyac6.fsf@gnu.org> <87a9capqfr.fsf@uwakimon.sk.tsukuba.ac.jp> <87ob0qsi7g.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: ger.gmane.org 1396007051 13095 80.91.229.3 (28 Mar 2014 11:44:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Mar 2014 11:44:11 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 28 12:44:20 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WTVCt-0005G2-RS for ged-emacs-devel@m.gmane.org; Fri, 28 Mar 2014 12:44:19 +0100 Original-Received: from localhost ([::1]:60707 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTVCt-0000Q6-EO for ged-emacs-devel@m.gmane.org; Fri, 28 Mar 2014 07:44:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTVCl-0000Ih-6k for emacs-devel@gnu.org; Fri, 28 Mar 2014 07:44:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTVCf-0002AZ-3Q for emacs-devel@gnu.org; Fri, 28 Mar 2014 07:44:11 -0400 Original-Received: from mgmt2.sk.tsukuba.ac.jp ([130.158.97.224]:40167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTVCY-0001xC-G1; Fri, 28 Mar 2014 07:43:58 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mgmt2.sk.tsukuba.ac.jp (Postfix) with ESMTP id 8757F970A3D; Fri, 28 Mar 2014 20:42:49 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 75E661A28DC; Fri, 28 Mar 2014 20:42:49 +0900 (JST) In-Reply-To: <87ob0qsi7g.fsf@fencepost.gnu.org> X-Mailer: VM undefined under 21.5 (beta34) "kale" 2a0f42961ed4 XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 130.158.97.224 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:171071 Archived-At: David Kastrup writes: > "Stephen J. Turnbull" writes: > > But this is a completely different issue from unibyte buffers. Emacs > > doesn't need unibyte buffers to perform its work, and if they are > > desirable on the grounds of space or time efficiency, they should be > > opaque to Lisp. > > Well, Emacs is more following the non-opaque philosophy (XEmacs, in > contrast, has even an opaque character type and several other > ones). Those are irrelevant to my point, though. The problem here is that unibyte buffers are a second representation of a single type (the buffer). "Mr. Foot, meet Mr. Bullet, I'm sure you'll get along fine!" > That has the advantage that you can use all sorts of available tools as > long as they don't break. In this case, it's like being offered the hammer head and the handle separately. I'll say one thing for that approach, though -- now you have *two* excellent ways to give yourself a headache, with two different (musical?) sounds when you drum on your crown! > It has the disadvantage that the question "what is the right behavior > for x?" needs to be answered quite more often since you can't take the > "x does not apply to y anyway" route out as often. The right behavior here is for a unibyte buffer to do *exactly* the same thing that a multibyte buffer would. In which case you have a single (opaque) type, as far as users can tell. > Efficiency took a dive but the alternatives were just too horrible > API-wise. Unibyte buffer is just too horrible API-wise. My advice is: nuke it. Steve