3 ms·
Can you please provide an example of good C code? I agree that absence of tests isn't great, and is very common with many C-based projects. But the rest of you
by the-lazy-guy 2y ago
Can you please provide an example of good C code?
I agree that absence of tests isn't great, and is very common with many C-based projects. But the rest of your comments reads like "ooh, it's C, disgusting!". I hope, I'm wrong.
- woodruffw 2y agosqlite3 is the canonical example of a mature, well-structured, excellently tested C codebase. I would also submit cURL/libcURL as a strong example.
- the-lazy-guy 2y agoThank you. These 2 are well-known, as well as plenty others. But I wanted to see answer from the author of the comment to which I replied. Apart from tests (of which both sqlite and curl have plenty, and that is obviously good), I don't see any reasonable difference in sqlite or curl code in aspects which were mentioned in their comment (namely, style and ownership). I'd like to see what they think is reasonable C code.