emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using empty_string as the only "" string


From: Dmitry Antipov
Subject: Re: using empty_string as the only "" string
Date: Wed, 25 Apr 2007 17:22:38 +0400
User-agent: Thunderbird 1.5.0.7 (X11/20061008)

Kenichi Handa wrote:

Unfortunately no.  Currently Emacs behaves as this:

(concat "" "\300") => "\300"
(concat (string-to-multibyte "") "\300") => "À"

Hm. Is there any reason(s) to behave as you described ?

For example, if I want to make multibyte "ÀÈ", I would like to use

(string-to-multibyte (concat "\300" "\310")) => "\xc0\xc8" (why ?)

or

(concat (string-as-multibyte "\300") (string-as-multibyte "\310")) => 
"\xc0\xc8" (why ?)

instead of

(concat (string-to-multibyte "") "\300" "\310") => "ÀÈ",

similar to C:

int x, y;
float f;
...
f = (float)(x + y); // may overflow

or

f = (float)x + (float)y; // probably better

instead of strange

f = (float)0 + x + y;

Of course, with more changes to alloc.c, we can keep unique
multibyte empty string and unique unibyte empty string.

IMHO this is similar to have more than one Qnil or Qt - very
strange, indeed.

But, is it really worth working on that ?

If you mean making two empty strings - obviously no.

Dmitry





reply via email to

[Prev in Thread] Current Thread [Next in Thread]