[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] CHICKEN in production
From: |
Michele La Monaca |
Subject: |
Re: [Chicken-hackers] CHICKEN in production |
Date: |
Mon, 13 Oct 2014 14:35:54 +0200 |
On Wed, Oct 8, 2014 at 5:54 PM, John Cowan <address@hidden> wrote:
> Peter Bex scripsit:
>
>> It was discussed before on this list, and I shot it down due to
>> the danger, however I think it may be possible to change the string
>> representation to always include a \0 at the end, so that passing it
>> to C will simply be a matter of passing a pointer.
>
> +1 to that.
>
>> The danger could be avoided by a taint bit: if the string is known
>> to not contain \0, it can be passed directly. Otherwise, it needs to
>> be checked and marked if it's safe. If it's unsafe, an exception can
>> be thrown.
>
> IMO the better approach is simply to forbid NUL in strings altogether.
> It has no semantics as a character: there is never any situation in which
> you need the NUL character as opposed to the 0 byte in a bytevector.
> The R7RS was worded to allow implementations to do this.
I must confess I didn't read the entire thread. But, what exactly buys
us barring NUL in strings other than limiting the usefulness of the
type and its powerful API (while breaking a lot of things along the
way)? Also, NUL is a valid UTF-8 character.
Regards,
Michele
- Re: [Chicken-hackers] CHICKEN in production, (continued)
- Re: [Chicken-hackers] CHICKEN in production, Peter Bex, 2014/10/08
- Re: [Chicken-hackers] CHICKEN in production, Jörg F. Wittenberger, 2014/10/08
- Re: [Chicken-hackers] CHICKEN in production, Peter Bex, 2014/10/08
- Re: [Chicken-hackers] CHICKEN in production, Jörg F. Wittenberger, 2014/10/08
- Re: [Chicken-hackers] CHICKEN in production, John Cowan, 2014/10/08
- Re: [Chicken-hackers] CHICKEN in production, Jörg F. Wittenberger, 2014/10/10
- Re: [Chicken-hackers] CHICKEN in production, Christian Kellermann, 2014/10/10
- Re: [Chicken-hackers] CHICKEN in production, Jörg F. Wittenberger, 2014/10/10
- Re: [Chicken-hackers] CHICKEN in production, Christian Kellermann, 2014/10/10
- Re: [Chicken-hackers] CHICKEN in production, Jörg F. Wittenberger, 2014/10/10
- Re: [Chicken-hackers] CHICKEN in production,
Michele La Monaca <=
- Re: [Chicken-hackers] CHICKEN in production, Peter Bex, 2014/10/13
- Re: [Chicken-hackers] CHICKEN in production, Michele La Monaca, 2014/10/13
- Re: [Chicken-hackers] CHICKEN in production, Peter Bex, 2014/10/13
- Re: [Chicken-hackers] CHICKEN in production, John Cowan, 2014/10/13
- Re: [Chicken-hackers] CHICKEN in production, Michele La Monaca, 2014/10/13
- Re: [Chicken-hackers] CHICKEN in production, Aleksej Saushev, 2014/10/13
- Re: [Chicken-hackers] CHICKEN in production, John Cowan, 2014/10/13
- Re: [Chicken-hackers] CHICKEN in production, Aleksej Saushev, 2014/10/14
- Re: [Chicken-hackers] CHICKEN in production, Florian Zumbiehl, 2014/10/13
- Re: [Chicken-hackers] CHICKEN in production, John Cowan, 2014/10/13