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: Fwd: Re: Inadequate documentation of silly characters on screen. Date: Fri, 20 Nov 2009 11:43:42 +0900 Message-ID: <87y6m17w69.fsf@uwakimon.sk.tsukuba.ac.jp> References: <20091118191258.GA2676@muc.de> <20091119082040.GA1720@muc.de> <874ooq8xay.fsf@wanchan.jasonrumney.net> <20091119141852.GC1720@muc.de> <20091119155848.GB1314@muc.de> <19205.30349.786007.611623@parhasard.net> <20091119172934.GD1314@muc.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1258684656 29161 80.91.229.12 (20 Nov 2009 02:37:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Nov 2009 02:37:36 +0000 (UTC) Cc: Aidan Kehoe , emacs-devel@gnu.org, Andreas Schwab , Stefan Monnier , Jason Rumney To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 20 03:37:28 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NBJNH-0004nQ-LS for ged-emacs-devel@m.gmane.org; Fri, 20 Nov 2009 03:37:27 +0100 Original-Received: from localhost ([127.0.0.1]:57764 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBJNG-0007tI-W3 for ged-emacs-devel@m.gmane.org; Thu, 19 Nov 2009 21:37:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NBJNA-0007s8-1s for emacs-devel@gnu.org; Thu, 19 Nov 2009 21:37:20 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NBJN5-0007pH-A7 for emacs-devel@gnu.org; Thu, 19 Nov 2009 21:37:19 -0500 Original-Received: from [199.232.76.173] (port=60745 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBJN5-0007pD-4H for emacs-devel@gnu.org; Thu, 19 Nov 2009 21:37:15 -0500 Original-Received: from mtps02.sk.tsukuba.ac.jp ([130.158.97.224]:45222) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NBJN0-0005hv-N5; Thu, 19 Nov 2009 21:37:11 -0500 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mtps02.sk.tsukuba.ac.jp (Postfix) with ESMTP id 900F9820E; Fri, 20 Nov 2009 11:37:05 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 6540C1A25EE; Fri, 20 Nov 2009 11:43:43 +0900 (JST) In-Reply-To: <20091119172934.GD1314@muc.de> X-Mailer: VM 8.0.12-devo-585 under 21.5 (beta29) "garbanzo" d20e0a45a4b2 XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:117317 Archived-At: Alan Mackenzie writes: > In XEmacs, characters and integers are distinct types. That causes > extra work having to convert between them, both mentally and in writing > code. Why do you have to convert? The only time you need to worry about the integer values of characters is (1) when implementing a coding system and (2) when dealing with control characters which do not have consistent names or graphic representations (mostly the C1 set, but there are areas in C0 as well -- quick, what's the name of \034?) When do you need to do either? > It is not that the GNU Emacs way is wrong, it just has a bug at the > moment. I agree that equating the character type to the integer type is not "wrong". It's a tradeoff which we make differently from Emacs: Emacs prefers code that is shorter and easier to write, XEmacs prefers code that may be longer (ie, uses explicit conversions where necessary) but is easier to debug because it signals errors earlier (ie, when a function receives an object of the wrong type rather than when a user observes incorrect display). However, I think that allowing a given array of bytes to change type from unibyte to multibyte and back is just insane. Either the types should be different and immutable (as in Python) or there should be only one representation (multibyte) as in XEmacs.