chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] CHICKEN in production


From: Jörg F. Wittenberger
Subject: Re: [Chicken-hackers] CHICKEN in production
Date: Mon, 13 Oct 2014 18:06:12 +0200
User-agent: Mozilla/5.0 (X11; Linux armv7l; rv:31.0) Gecko/20100101 Icedove/31.0

Am 13.10.2014 um 16:35 schrieb Florian Zumbiehl:
Hi,

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.
IMO, this is a terrible idea. At the core, the reason is simply this: If
your character strings can't store NUL, your character strings can't store
Unicode.

And obviously, Unicode is not an end in itself,

Good point.

  but is used by lots of
other standards for the encoding of character data--none of those can be
implemented in a language that can't represent Unicode (at least not using
the built-in character strings--you still could reimplement your own
abstraction, of course, just as you would do for sane data handling in C).

Standard is better than better.  (as ??? said)




reply via email to

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