3 ms·
Depends on the area of the code you look at, but they can be fairly sparse, yes: https://github.com/python/cpython/blob/master/PC/python_uwp.cpp https://github
by pytester 7y ago
Depends on the area of the code you look at, but they can be fairly sparse, yes:
https://github.com/python/cpython/blob/master/PC/python_uwp.cpp https://github.com/python/cpython/blob/master/PC/python_uwp....
I'd say that redis is probably a better example of gold standard clean C code, though, and they follow the rule of "don't comment unless it's decidedly non-obvious" pretty assiduously:
https://github.com/antirez/redis/blob/unstable/src/ae_epoll.c https://github.com/antirez/redis/blob/unstable/src/ae_epoll....
- tln 7y agoThose two files do have a low ratio of comments. However a large number of files in those code bases have quite a lot more comments... I personally don't think these two code bases have sparse comments, overall, although perhaps it's subjective or my bias is affecting my judgement :) Eg, to me this is well-commented and I wouldn't call it sparse. https://github.com/antirez/redis/blob/unstable/src/latency.c https://github.com/antirez/redis/blob/unstable/src/latency.c