News for hackers. Stuff that matters.
Re:C: Simple Defer, Ready to Use by throw16180339 on Monday January 06, 2025 @09:14PM (#42618430)
How do you handle breaking out of a nested for loop without goto?

    for (…) {
        for (…) {
            if (…) {
                …
                goto found;
            }
        }
    }
    found:
This is straightforward with goto and may even be vectorizable. I guess you could move the loop to a separate function or add additional flags to each loop, but neither of these seems like an improvement.
Re:C: Simple Defer, Ready to Use by cjensen on Tuesday January 07, 2025 @01:03PM (#42625324)
Obviously first two strats don't work, so I would use the third.