Brutkey

Lars Wirzenius
@liw@toot.liw.fi

When I was a lot younger I wrote C string handling libraries that I used for my own projects or for work projects. I have Opinionsβ„’β„’ about this. But it's no longer a battle I care to engage in. There is no way to win, without leaving C behind.


Lars Wirzenius
@liw@toot.liw.fi

C strings are a sequence of bytes ending in a zero byte. It's awkward, cumbersome, error prone & stupid in many ways, but in the early 1970s, having strings with a length field was expensive. When your biggest computer has about 9 KiB of RAM, spending two or four bytes to express the length of a string was hideously expensive. A one byte terminator was the cheapest option in terms of memory use.

There's more resources available today, but entrenched fundamentals are quite difficult to change.

rag. Gustavino Bevilacqua
@GustavinoBevilacqua@mastodon.cisti.org

@liw@toot.liw.fi

This remembers me of Bob Bemer, who in 1958 (!!!) warned about the Y2K problem.

https://en.wikipedia.org/wiki/Year_2000_problem#Early_attention