bug-bash
[Top][All Lists]
Advanced

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

Re: Variables can’t contain NUL


From: L A Walsh
Subject: Re: Variables can’t contain NUL
Date: Thu, 24 May 2018 17:55:15 -0700
User-agent: Thunderbird



Chet Ramey wrote:
On 5/21/18 8:37 AM, Greg Wooledge wrote:

If you're looking for some deeper answer, like "Why did Stephen Bourne
write it this way back in 1977?" then I would hazard a guess along the
lines of "It is tightly coupled to the underlying C argument-passing
interface which uses NUL-terminated strings."

As well as the majority of the libc API, which depends on null-terminated
strings.
---
   And so many bugs happen because of it.
   Maybe the C++ string class would would be more robust...
Wouldn't have to be all at once, but getting it to compile under C++ as
legacy C code might be a useful first step.

   Then specific features or areas could be targeted for rework
or what's the buzzword these days... oh yeah... refactoring! ;-)







reply via email to

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