TL;DR: Yes. We shall please not answer in comments. In my opinion: everything in comments below a question that 'answers' a question is up for grabs. Attribution or even wiki-style are not needed, but add a certain decency or professionalism about that.
Write an answer and then flag the comments for deletion as "no longer needed".
More in depth explanation:
People have a tendency to treat comments like they matter, or are permanent, or as places to put information that they for whatever reason don't want to put in an actual answer. Guess what? They're not.
Comments are, first and foremost, ephemeral. They're inherently impermanent. If you post a comment, don't expect it to stick around for long.
You're told this when you first gain the privilege to leave comments, at 50 reputation. You get a nice notification "congrats, you've earned this privilege. Learn about it in the help center."
Alright, so let's go look at the help center.
And there "what are comments?" says:
Comments are temporary "Post-It" notes left on a question or answer.
Right there. Temporary Post-It notes. Not permanent notes on an answer. Just an ephemeral note… that has a very specific purpose.
This is where the Post-It note analogy ends. While Post-It notes can be used for a whole multitude of things, comments are really intended for three very specific purposes, again enumerated in the help center.
When should I comment?
You should submit a comment if you want to:
- Request clarification from the author;
- Leave constructive criticism that guides the author in improving the post;
- Add relevant but minor or transient information to a post (e.g. a link to a related question, or an alert to the author that the question has been updated).
Three very specific purposes… which happen to not include answering the question. In fact, in the next section, "When shouldn't I comment?", we see mention of answering the question:
When shouldn't I comment?
Answering a question or providing an alternate solution to an existing answer; instead, post an actual answer (or edit to expand an existing one);
If we wanted people to write answers in comments like that, answers wouldn't exist. Not to mention that writing answers in comments has some serious drawbacks:
Comments cannot be downvoted, only upvoted, and so you can't have the quality checks that answers have. You cannot edit comments to improve them after 5 minutes. You cannot accept a comment. If you answer in a comment, and the OP says that solved their problem, they may leave the site never to return and leave an answer unaccepted, if the commenter answered with what they had originally posted as a comment.
(Interpersonal Skills meta)
Not to mention that you can't get rep from comments.
And you're reminded of this every time you go to write a comment:
So now we've determined that writing answers in the comments is a bad idea, not worth it, and directly against site guidelines. So now, despite this, someone didn't feel like writing a full answer and dumped their half-written answer into a convenient textbox that was never intended for anything like that to be put in it.
So now someone comes along, sees the comments, and thinks "Hey, that could be a good answer if I take that information, flesh it out, and source it!"
Go for it. By any means.
If someone didn't write out the answer themselves... their loss. They had their opportunity. They chose to write it in the wrong place instead.
You are perfectly allowed to take that comment, flesh it out, and turn it into a proper answer. Since it had no business being posted in the comments in the first place, you're helping the site by moving the information into an answer.
This is a question and answer site, not a question and answer and half-answer site. All information should be collected into a question and an answer.
There's no requirement to make an answer that you took from a comment community wiki, but you're free to do that if it'll help your conscience… but hey, if the person who's writing answers as comments sees that you're earning rep from their failure to write a proper answer, perhaps they'll be incentivized to actually write a real answer next time ;).
It's a question of personal style to turn an actual answer then into a community wiki, or give attribution to where the content from the comment comes from. I'd like to see people contemplating to do the above to wait a bit before going ahead, then quote and attribute properly the content of their answer. I'd consider not giving attribution a form of plagiarism and bad manners. But I also see turning comments into proper answers as a very good idea.
Most of this is copied from Mithrandir's answer here