[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: C-isms: \0 bytes & Lua's stdlib (Re: [ANN] Lua 5.3.4 (rc3) now available)
- From: Vaughan McAlley <vaughan@...>
- Date: Sun, 29 Jan 2017 13:03:47 +1100
On 27 January 2017 at 11:57, nobody <email@example.com> wrote:
> Somewhere, the manual says "Lua is 8-bit clean: strings can contain any
> 8-bit value, including embedded zeros ('\0'). Lua is also
> encoding-agnostic; it makes no assumptions about the contents of a string."
About 28 years ago I was trying to program my first Hypercard stack. I
can't remember what I was trying to do, but not having nulls in
strings was a deal-breaker for me. Of course, it was just importing
the idea of C strings, but I had no idea of what a C string was. For
someone venturing out of Lua into the C API, a knowledge of how C
strings work should be one of the first things to learn.