r/ProgrammerHumor • • Oct 27 '26

Meme multiStringing

Post image
1.6k Upvotes

50 comments sorted by

View all comments

Show parent comment

6

u/GumboSamson Oct 27 '26

Firstly, I agree with everything you said here.

Except for the part where you implied that I claimed that all strings need to be treated securely. Most of them don’t, and that’s exactly why contiguous memory strings are popular.

Like you said, they’re fast, everybody understands them, nobody is surprised. They’re the best solution most of the time.

My point is that contiguous memory strings aren’t the only way to handle character sequences, and there are real cases when you’d pick one over the other. Not saying that one is universally better (which isn’t how engineering works).

2

u/Ok-Scheme-913 Oct 28 '26

Yeah I was sure you know it, it was just a bit unfortunate way to put it and I do see bad security takes all over the place so I just wanted to add my two cents so someone else doesn't misinterpret it

1

u/Stalking_Goat Oct 28 '26

Breaking up strings into individual characters and scattering them throughout your source code is a great trick for the International Obfuscated C Code Contest though!