Unrelatedly, why does their sample code ( man.netbsd.org/NetBSD-1.3/read ) have a line while ((dp = readdir(dirp)) != NULL), what's the point of doing a comparison != NULL if that's exactly the same behaviour as just omitting it? I'd expect sample code to not waste characters on a comparison that's completely unnecessary... Is there some edge case that I'm unaware of where it's different? :psyduck:

@vaporeon_ these days developers tend to prefer clarity over brevity. it's very normal to write extra code if the programmer thinks it is easier to understand that way

@wallhackio I just don't think that it adds any clarity at all...

@vaporeon_ I don't have strong feelings on the matter myself. But the beautiful thing about coding conventions is that you can ignore them and do whatever you want

Follow

@wallhackio @vaporeon_ eh you should at least be consistent within a codebase with the choices you make, which is my actual opinion about these sorts of matters of style and convention and layout and such

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.