4 ms·
OTOH if you need follow-mode, aren't your functions too long?
by swah 15y ago
OTOH if you need follow-mode, aren't your functions too long?
- pivo 15y agoProbably, but sometimes you have to work on other peoples's code. The worst for me was a 312 line function, which nearly caused me to quit.
- __rkaup__ 15y agoFrom the C code I've seen, 300 lines sounds like standard fare.
- LukeShu 15y agoI don't think that people give this situation enough credit. I once took over a project of about 30,000 lines of C++, with only about one line of commenting per 1,000 lines; and was frustrated with a lot of tools/documentation/suggestions that amounted to "don't write code like that". (Doxygen ended up being my friend)
- cpr 15y agoYes, but it's great to see your functions in context. I also use Emacs for text editing, and I'm writing a major manifesto right now which is thousands of lines.
- cageface 15y agoEmacs should have a dedicated manifesto mode.
- leif 15y agoSometimes you need to see context that extends past the boundary of a function.
- SoftwareMaven 15y agoI'd rather have too long than too short. I got some code recently where 3 lines was about the longest function (for a loop), and many functions were one line. It was nearly impossible to follow what was going on because you could never catch the "flow" of the code.