Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14141
| From | L A Walsh <bash@tlinx.org> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: Variables can’t contain NUL |
| Date | 2018-05-24 17:55 -0700 |
| Message-ID | <mailman.445.1527209727.1292.bug-bash@gnu.org> (permalink) |
| References | <564532BD.60801@tlinx.org> <20151113131735.GE27325@eeg.ccf.org> <e5ye6lts2mjn.ykx.xxuns.g6.gal_-_@galex-713.eu> <20180521123718.cumwnvmpt6x7urse@eeg.ccf.org> <1346a7f6-33b5-43f5-3bd5-7db40cda34f5@case.edu> |
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! ;-)
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: Variables can’t contain NUL L A Walsh <bash@tlinx.org> - 2018-05-24 17:55 -0700
csiph-web