News for hackers. Stuff that matters.
Re:Git's list of banned C functions by m463 on Thursday March 04, 2021 @07:32PM (#26350690)
I think 30-40 years ago it was perfectly appropriate to null-terminate strings. Every byte actually counted.

I remember thinking about setting the high bit to denote the end of string to save space.

Nowadays the binary for "hello world" might be as big as a whole operating system of the past.

(though honestly I can't recall the size of the OS on a boot floppy, but the original floppies were 160k)

Re:Git's list of banned C functions by tdeck on Thursday March 04, 2021 @08:43PM (#26351364)
Just a surreal reminder that 30 years ago was 1991. By that time it already didn't make sense to null terminate strings (except perhaps on embedded platforms).
Re:Git's list of banned C functions by munchbunny on Friday March 05, 2021 @11:52AM (#26358980)
To be fair, in 1991, 1mb of RAM was a substantial amount for a PC, so a single word per string instead of a byte per string could still add up quickly.