On Code Review SE, users should avoid answering questions in comments, because that's not what comments are for:
Do not provide suggestions for improvements in a comment, even if your suggestion makes a very short answer.
Recently, I have made efforts to make people aware of this rule by leaving a comment when they violate it. Often, this was something along the lines of 'Please, don't answer questions in the comments, but add an answer instead.'.
On May 15th, this question was posted here. Yesterday, I edited it and then voted to close, because the question was off-topic. I then saw that @Martin York left three comments:
I would use libEvent that will tell you when a socket has data and you can go get it. But that is very low level. Above that there is boost async io boost.asio library that virtualize sockets into sinks and streams. There is nothing really in between (that I know of). – Martin York May 15 at 22:23
PS. Using threads to increase parallelism to read more from sockets is the wrong way to go. Socket communication is inherently slow (compared to processors) and threads are expensive and bulky. The better way to go is have a single thread multiplex across thousands of connections. This is how modern web servers work. See C10K. – Martin York May 15 at 22:28
If you are interested I have wrapped sockets. To provide a non blocking std::istream. So you can create a socket connection and it behaves like a normal std::istream. Any blocking operation causes the thread to finds another stream to handle. See ThorsNissa. It is noware as polished or advanced as boost asio but I work on it when I have time. Current documentation here: lokiastari.com/ThorsNisse/#introduction – Martin York May 15 at 22:37
In my opinion, these three comments make up an answer of its own, and should be merged into a single answer. Remember:
Answers need not cover every issue in every line of the code. Short answers are acceptable, as long as you explain your reasoning.
I made the user aware of this by replying:
@Martin York Please do not answer questions in comments. Add an answer instead. – Coal_ 17 hours ago
To get this response:
@Coal_ if I wanted to answer the question I would have. As a result I only made a couple of quick comments. As such if you think these should be answers please feel free to expand on the simple comments into a full answer, rather than making piffy comments. – Martin York 14 hours ago
I again tried to explain why the comments should be an answer, but got a snarky response:
@Coal_ You are wrong there is not enough information here to constitute an answer. Just a set of brief comments that give advice. I also will not be turning the comments into an answer because there is nothing valid to constitute an answer. But thanks for the wrong and unsolicited advice. Maybe when you gain some experience on this site you will understand the difference. – Martin York 1 hour ago
I don't want to pick a fight, my intention was to help, and to correct behavior, in a friendly manner. I flagged the first comment, but to no avail (yet, I understand the mods are busy).
Am I missing something and was my advice wrong?
What should happen to such comments in the future? Should we flag them? Should they be deleted?