Hacker News new | past | comments | ask | show | jobs | submit login

Reading the diff, I'm neither surprised that this bug existed nor will I be surprised when similar bugs arise.

There must be a more readable to write even low-level code like this.




Yes, there is. That code needs iterators.


but most of that code isn't iterating. the only parts in that function i see that are iterating ([0] and the similar loop below it) seems straightforward enough to me.

i don't see how they would help here unless i don't know what you mean by iterators (assuming c++-style iterators or similar).

[0]: http://gitweb.dragonflybsd.org/dragonfly.git/blob/cf297f2ccc...


honestly, i think it's hard to say this generally without more context into the code. imo nothing there looks too egregious (or at least not abnormally so) for very low level code.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: