4 ms·
Neat trick using “list_for_each” to shorten a verbose for loop that’s nearly always the same. Although it did make me do a double take. And since it’s hiding co
by _sdegutis 9y ago
Neat trick using “list_for_each” to shorten a verbose for loop that’s nearly always the same. Although it did make me do a double take. And since it’s hiding control flow, it would make ‘break’ and ‘continue’ look out of place. Is this a common convention and you just kind of get used to it?
- buserror 9y agoThe list is very, very, VERY similar to linux's kernel list.h -- which is a little masterpiece by itself...
- eggy 9y agoHidden control flow is why I decided to learn Zig [1]. I was learning Rust, and I intend to keep at it, but I have chosen Zig to be my C replacment because I am personally finding it easier to be more productive. Andrew Kelley's doing a great job with the language! [1] - ziglang.org