4 ms·
I am only a spare time C coder myself and was surprised that I can follow the code. Nice! Any reason why typedef struct is avoided?
by cntlzw 8y ago
I am only a spare time C coder myself and was surprised that I can follow the code. Nice! Any reason why typedef struct is avoided?
- acidx 8y agoThanks! Code readability is important: not only for others (it's an open source project, and contributions are welcome!), but for myself... I have terrible memory. :) The reason struct typedefs are avoided is because I prefer to be explicit (the "Zen of Python" isn't just for Python!). It's also common practice in most of the projects I work on, and it's not much of an issue for me as far as a little bit of typing goes: I'm a fast typist.
- kibibu 8y agotypedef struct adds extra stuff to the global namespace. The Linux style suggests avoiding it: https://www.kernel.org/doc/html/v4.10/process/coding-style.html#typedefs https://www.kernel.org/doc/html/v4.10/process/coding-style.h...