News for hackers. Stuff that matters.
Re:Ask HN: Why does Linux Kernel use goto statements? by ThrowawayR2 on Wednesday December 08, 2021 @01:32AM (#29481851)
> "...isn't it an indication of bad design?"

No. See https://en.wikipedia.org/wiki/Goto#Common_usage_patterns It's still used in systems programming contexts and in machine language, where there are no branching constructs other than conditional or unconditional jumps (i.e. "goto").

Re:Ask HN: Why does Linux Kernel use goto statements? by soheil on Wednesday December 08, 2021 @12:27PM (#29487645)
> systems programming contexts

What does this mean?

> machine language

We're talking about C.

Re:Ask HN: Why does Linux Kernel use goto statements? by AnimalMuppet on Wednesday December 08, 2021 @03:45PM (#29490255)
> > systems programming contexts

> What does this mean?

It means operating systems and similar places.

Re:Ask HN: Why does Linux Kernel use goto statements? by soheil on Wednesday December 08, 2021 @08:27PM (#29492751)
I feel like if goto is bad design it should be specially avoided in operating systems since they are so crucial to everything a computer does if it’s good design then why not adopt them in applications?