From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: using empty_string as the only "" string Date: Thu, 26 Apr 2007 00:23:39 -0400 Message-ID: References: <462EE947.000007.15251@camay.yandex.ru> Reply-To: rms@gnu.org NNTP-Posting-Host: lo.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1177561595 6438 80.91.229.12 (26 Apr 2007 04:26:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 26 Apr 2007 04:26:35 +0000 (UTC) Cc: emacs-devel@gnu.org To: dmantipov@yandex.ru Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Apr 26 06:26:28 2007 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 1HgvYp-0003O8-Ha for ged-emacs-devel@m.gmane.org; Thu, 26 Apr 2007 06:26:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HgveW-0001C6-DE for ged-emacs-devel@m.gmane.org; Thu, 26 Apr 2007 00:32:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HgveS-0001Bi-QB for emacs-devel@gnu.org; Thu, 26 Apr 2007 00:32:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HgveS-0001BW-3q for emacs-devel@gnu.org; Thu, 26 Apr 2007 00:32:16 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HgveR-0001BT-Uw for emacs-devel@gnu.org; Thu, 26 Apr 2007 00:32:15 -0400 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HgvYk-0006k3-D2 for emacs-devel@gnu.org; Thu, 26 Apr 2007 00:26:22 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.60) (envelope-from ) id 1HgvW7-0002iQ-6v; Thu, 26 Apr 2007 00:23:39 -0400 In-reply-to: <462EE947.000007.15251@camay.yandex.ru> (dmantipov@yandex.ru) X-detected-kernel: 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:70155 Archived-At: How you can modify the multibyteness of an empty string ? You can't aset multibyte char (as well as anything else) into empty string, and conversion functions like 'string-make-unibyte' or 'string-to-multibyte' always creates new strings instead of touching an argument. Moreover, since "" is a no-op in concatenation operations, it may be silently discarded without looking into internal structure, isn't it ? The multibyteness of a null string does affect concatenation. But you are right, I believe, that it is impossible to alter the multibyteness of an existing null string. You can't do it with aset because there are no positions you could store in. Thus, it would be necessary to keep one canonical null unibyte string and one canonical null multibyte string.