News for hackers. Stuff that matters.
Re:The case against a C alternative by jstimpfle on Wednesday August 10, 2022 @02:11AM (#32408311)
I wrote simple ELF and PE/COFF writers too, but independently of that, zero terminators are what lets you find strings in a binary. And what allows the "strings" program to function. It simply couldn't work with without those terminators.

Similarly, the text we're exchanging consists of words and sentences that are terminated using not zero bytes, but other terminators. I'm very happy that they're not length delineated.

Re:The case against a C alternative by WalterBright on Wednesday August 10, 2022 @03:55AM (#32408981)
> It simply couldn't work with without those terminators.

Yeah, it will. For a related example, I use `grep` all the time to find strings in source code. Source code is not 0 terminated. It works fine.

Re:The case against a C alternative by jstimpfle on Wednesday August 10, 2022 @05:22AM (#32409510)
I use "grep -w foo" (or something like "grep '\<foo\>'"), because when I look for "foo" I don't want "bazfoobar". grep -w only works because the end of words is signaled in-band (surrounding / terminating words with whitespace).