News for hackers. Stuff that matters.
Re:Google, Xiaomi, and Huawei affected by zero-day flaw that... by wildmusings on Saturday October 05, 2019 @10:19PM (#21169402)
You’re wrong that no one should ever use goto. Goto is a perfectly fine control flow operator IF AND WHEN you use it in a highly structured, well-understood way. This is how systems programming is done. A “goto cleanup” section at the end of a function is the best way to do exit-on-error in C, hands down.

I hate that people keep peddling this nonsense because they wrote a little C and read a headline about “goto considered harmful”, which is a gross oversimplification and a BAD piece of “wisdom” that for some reason won’t die. This is how serious handling in C is done. Please stop repeating this tired trope.

Re:Google, Xiaomi, and Huawei affected by zero-day flaw that... by jumpingmice on Sunday October 06, 2019 @12:00PM (#21172806)
Goto is only de rigueur in terrible languages that are unable to release function-local resources automatically. It is an intentional choice by kernel authors to ignore all progress in our field after 1988 and insist on writing everything in C. It’s not the goto statements that are the problem, rather it is the culture that necessitates them.
Re:Google, Xiaomi, and Huawei affected by zero-day flaw that... by neop1x on Monday October 07, 2019 @05:24AM (#21178880)
Do you realize how big the kernel source is? No one wants to rewrite it to C++. Also C++ compiles slower and can be more difficult to read, depending on code style and features used. C++ is also far more fragile regarding compiler compatibility and sometimes spits rather confusing error descriptions.
Re:Google, Xiaomi, and Huawei affected by zero-day flaw that... by xeromal on Sunday October 06, 2019 @03:31AM (#21170426)
I'm sure some of the people parroting that got it from their professors in college. I know mine sure did.