Hacker News new | past | comments | ask | show | jobs | submit login

A common LOC metric for languages in the C family is to count semicolons ("real" lines of code).



I used to use that all the time. It's great because it's quick, and a pretty damn good sloppy metric. I remember joking that the extra semicolons in for loops and the lack of semicolons in if/while statements balance each other out. People tend not to use semicolons in comments, either, except in commented-out code (which some of us have a pet peeve against anyway).


It's very easy to correct for both for loops and if/while.


Yes, but then the metric is no longer so charmingly trivial.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: