alt.hn

7/15/2026 at 6:12:57 PM

C Strings: A 50-Year Mistake – By Trần Thành Long

https://longtran2904.substack.com/p/c-strings-a-50-year-mistake

by rbanffy

7/15/2026 at 8:07:47 PM

In my projects I tried pretty hard to remake the world and get rid of C strings. Went all in on freestanding C, got rid of the standard library, developed my own abstractions.

But I just didn't quite make it. The operating system interfaces want C strings. Can't even open a file without C strings. To fully exorcise C strings, I would need to reinvent Linux. I haven't got enough lifetimes for the task.

Ended up tacking on a hidden trailing NUL to every single buffer instead.

by matheusmoreira

7/15/2026 at 6:53:35 PM

when i first started programming in the early 90s we had someone on our team keep adding strcat("this string", NULL); His name was Karl. Every time we saw bad coding practices we called it Karl code.

by kestermckinney

7/15/2026 at 9:58:54 PM

We had a "Karl" at my first engineering job. Karl happened to be our team lead, but he produced a lot of Karl code. Many expletives and facepalms in that office. It got so bad, a member on our team that was highly religious asked to have their own office (and he got it).

by bitbasher