News for hackers. Stuff that matters.
Re:Why is strlen so complex in C? by rurban on Tuesday August 27, 2019 @03:17AM (#20807014)
Nope, for sure not.

A good implementation would stick to the standard (size_t nor word_t), and would inc the pointer, not the counter. Formatting would be better (the final ; ouch).

This is junior stuff.

Re:Why is strlen so complex in C? by m463 on Tuesday August 27, 2019 @08:36PM (#20815789)
Maybe verification tools choke on pointer incrementing?

Having worked on a variety of code bases and coding styles, I think if there are coding rules and they are consistent across all the source files, it becomes easy to read even with wierdnesses. I hated perl with @_ and $_, but after working with it enough they became known quantities.

And you can probably read all the lines of code in your lifetime, since the whole microkernel is ~30k lines of code.