News for hackers. Stuff that matters.
Re:C Strings and my slow descent to madness by vkou on Thursday April 06, 2023 @10:12PM (#35477191)
You've grown to love the footguns and hundreds of thousands of security holes that null-terminated strings have introduced over the decades?

It's not so much a question of different is bad, it's that having one of the six positions for your car's stick shift be marked 'Self-destruct' is... Sub-optimal. I'm sure you're smart enough to operate that car safely, but the ditches seem to be filled with burnt-out husks.

Tab-based, versus curly-brace indentation, on the other hand, is a question of how you want the car painted. Purely personal taste.

Re:C Strings and my slow descent to madness by unscaled on Friday April 07, 2023 @01:09AM (#35478251)
> It's not so much a question of different is bad, it's that having one of the six positions for your car's stick shift be marked 'Self-destruct' is... Sub-optimal. I'm sure you're smart enough to operate that car safely, but the ditches seem to be filled with burnt-out husks.

Good analogy, but I think you're being to forgiving to C. It's more like having all 6 out of the 6 positions of your car's stick shift marked as self-destruct. If you don't want the car to self-destruct while changing gears, you need to tune your FM radio to 99.0 Mhz and quickly set your turn signals to left, right and left again before shifting. And that only works safely when shifting into the 1st, 2nd and 4th gears, unless you modify your car engine sot it can only drive on Microsoft roads.

Re:C Strings and my slow descent to madness by scoutt on Friday April 07, 2023 @04:09AM (#35479379)
On a Python car, the car won't even start if you don't have your cosmetics right, and they have to be of a specific color.
Re:C Strings and my slow descent to madness by vkou on Friday April 07, 2023 @12:46PM (#35483786)
I'm pretty sure that my C program either won't compile, or won't do what I want if I treat curly braces and semicolons as you are treating python indentation.

They serve the exact same purpose, and are both necessary, but the choice of braces versus whitespace is purely aesthetical.