guile-devel
[Top][All Lists]
Advanced

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

Re: The empty string and other empty strings


From: David Kastrup
Subject: Re: The empty string and other empty strings
Date: Tue, 10 Jan 2012 18:04:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> Hello Mark,
>
> Mark H Weaver <address@hidden> skribis:
>
>> address@hidden (Ludovic Courtès) writes:
>>> Anyway, it seems that before, you couldn’t get any encoding error for
>>> scm_from_stringn ("", "SOME-ENCODING"), whereas now you can.
>>
>> Good point.  I just committed a change to avoid this.
>
> Cool, thanks for the instant reply and fix!
>
> And thanks to Mike and you for the remainder of the discussion and
> optimizations.
>
> BTW, I just noticed that R5RS uses the phrase “empty strings” (plural)
> in the description of ‘eq?’, which means we’re indeed on the right track.

R5RS is supposed to be a standard, not a guessing game.  When there is
nothing more definitive than splitting hairs in the grammar of the text,
I would prefer sane semantics over probably not even intended
contortions.

"Freshly allocated" for me means that _no_ string operation on
pre-existing objects can make this string different from what it is.
And since there is no way to share the empty contents of an empty string
with other strings, this is true even if every empty string is eq? to
every other one.

-- 
David Kastrup




reply via email to

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