bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#34873: 27.0.50; Creating unibyte string in emacs modules


From: Lars Ingebrigtsen
Subject: bug#34873: 27.0.50; Creating unibyte string in emacs modules
Date: Thu, 27 Aug 2020 15:04:32 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> In what way are unibyte strings slippery slopes?  They're a standard
>> part of the Emacs type vocabulary.
>
> They produce incorrect display of non-ASCII characters, for starters.
> They also produce unexpected effects when concatenated with multibyte
> strings.  They are in general something to avoid because of these and
> other subtleties, since many Lisp programmers are unaware of them, and
> can easily fall into one of these pitfalls.
>
> In this case AFAIR the request was to use unibyte strings for binary
> data, i.e. stuff that is not a string at all, which is one more reason
> not to base the implementation on unibyte strings.

Yes, the only real reason to use unibyte strings is for binary data, I
thought?  That's the use case in the proposed patch, too.

Just like unibyte buffers are for data, not text, unibyte strings are
for data, not text.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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