Many times users paste long code and those who want to refer to a specific line refer to it by its content, which can be misleading or cumbersome if the content appears elsewhere or the line is long.
I was wondering why code blocks don't have line numberings as present in many other sites hosting code files. Something simple like this
01 MainClass {0203 AConstructor {0405 something something06 more...07 }0809 void function1(int x) {1011 ...12 }13 }
can't be hard to implement and of course useful as all IDEs do this. I would go as far as asking to be able to start from a specific line number (e.g. start numbering from 12) in case the user posts a stack trace relating to part of the code and others can see exactly where the error occurred. For example if "error occurred on line 25 of main" the user might just post main
which starts on line 12 of the file.