In this comment I reminded a user that comments are temporary, by providing a link to the definition of a comment:
Comment at your own risk. I have had many thoughtful, detailed, and well-researched comments disappear because a moderator felt they were cluttering the page. Users cannot vote to un-delete a comment. Unless you are taking screenshots of your comments, you can lose them forever.
Sometimes it's just better to answer the question (as the user did in the case I linked to at the beginning). However, people often comment because they don't want to write a poor-quality answer or don't have enough time to. We don't want to discourage them completely from commenting, when the value of the comment would still be better than having nothing at all.
How can we encourage people to write answers as answers rather than as comments? Well many of us, including you, have been leaving comments encouraging people to (as I did in the linked example at the top of this answer).
But also, we should continue to encourage people to answer (and to participate in general) by upvoting their high-quality contributions. Some people think that an answer has to be a masterpiece in order to get upvotes. Some of our most active users vote a lot, and others don't vote much at all.
There are Meta posts on other sites which encourage upvoting answers not because they are masterpieces, but because they are something that you believe belongs on the site. I was not going to go digging up such Meta posts (since I didn't know exactly where they were), but I decided to go and find at least one example:
I would just like to remark that upvoting, in my opinion, should not
be meant as some sort of "reward" to be given to exceptional answers
(which is what bounties are for).
Personally, I ask myself a very simple question to decide whether I
should upvote a question or answer: do I believe that this
question/answer should be on this site? It's not really about the
quality of the post, but more about indicating whether I think that
this post is a good fit for the site. How good the post actually is
will still be reflected in the upvotes, because a more useful post
will be found by more people which will therefore hopefully vote it up
more.
Consequently, I believe that upvotes should be given generously and
without too much overthinking. On a practical level, this also
encourages participation to the site, as many people like to see that
their post was appreciated by others, and will therefore be more
likely to stick around more when this happens.
With this principle in mind, we might see more generous upvoting. This encourages users to answer more often (and to participate more often in general). This will "implicitly" discourage people from answering in comments when what they really have is good enough to be an answer.