You can only format code with proper indentation in the question or the comments, but why can't you do the same in a comment other than this
? Sometimes the response from a comment is best said with code that might be several lines. IMHO, this would be a nice improvement.
-
4Because comments are crammed enough as it is.– BoltClock ModCommented May 21, 2014 at 5:25
-
2In python-land, chaining two or three short statements together with semicolons is awkward at best (and heretical at worst) so I wouldn't discount this entirely.– roippiCommented May 21, 2014 at 6:21
-
2Why the down votes??? It's a legitimate question!– occaslCommented May 21, 2014 at 6:39
-
4We can use votes to express disagreement with feature-requests here on Meta.– brasofiloCommented May 21, 2014 at 7:11
3 Answers
That's really not what the comment system is meant for.
Comments are, admittedly, second-class citizens; they're temporal, they don't add reputation (although you get enough upvotes in them and you get a few badges), and they've only got a little bit of space to work with. But, the value they provide is that they allow for brief commentary to request clarification of a question, or to point out errors in an answer.
If a user is continually having trouble, perhaps a private chat room would be of more value than adding comments.
I'd give Exit strategies for "chameleon questions" a quick read; questions that have the OP shoveling new code into comments have the same feel to a question that is repeatedly changed to fulfill a single question.
-
the justifications you provide are not convincing to me: * they don't add reputation - how is reputation relevant? * they only got a little bit of space to work with - this is a reasonable constraint the commenter has to work with, once again, how is it related to code formatting? * the value they provide is that they allow for brief commentary to request clarification of a question, or to point out errors in an answer - why couldn't commentary, clarification on pointing out errors be supplemented with a code block? Commented Sep 2, 2018 at 11:54
-
@DavidSoroko: I typed this up quite a long time ago and funnily enough, I find that many of the points I made here still hold. Comments aren't meant to be used for anything other than commentation. If you feel that you have to commentate with code, perhaps an answer (or a chat room) would be better.– MakotoCommented Sep 2, 2018 at 13:48
If it's more code than will fit in a simple inline code
statement, then it should probably be edited into the original answer, or a new answer should be written altogether.
-
That's not the scenario though. I give an answer and the person has a follow on question that he provided some code. This question is a good example of that: stackoverflow.com/questions/23773057/…– occaslCommented May 21, 2014 at 5:28
-
3@occasl That question is a good example of what comments are not for Commented May 21, 2014 at 7:12
-
@occasl - follow up questions should be a a new question.– ChrisF ModCommented Jul 25, 2014 at 17:57
I very rarely post a comment as an answer. When I do that, I always admit it in the first sentence. Those non-answers have non-negative vote totals, so presumably most readers agreed with my decision.
I do it when I don't have an answer, but I do have something to say that I think is useful and relevant but that just doesn't fit in the comment format. It might include code, or a list, or be too long.
To my mind, the current comment/answer split appears to be a case of co-incidental coupling. There are two dimensions to posts, format and nature. Most answers need more sophisticated formatting than most comments, but that is not always the case. There should be some official system for handling posts that have the nature of being a comment, but need the formatting that is currently only available for answers.