A lot of ground has already been covered, which I won't try and retread; these comments are hard to get right, and often come across in ways that (I imagine) the commenter doesn't intend, which makes them often irrelevant.
Here's the thing I want to call out in these comments:
They frequently have the wrong focus.
I love helping askers– I think it's extremely important for Stack Overflow to give deep, meaningful explanations that take into account readers' inexperience in order to properly cover a topic or question and convey useful information effectively, which sometimes includes giving helpful advice in comments that isn't strictly related to answering the question.
Comments likeOstensibly, that's the ones you've pointed outgoal of such comments... but I argue that they do no such thing.
A comment that reads (hyperbolically)something like:
These sites aren't good, you should go read a C++ book instead.
Are not helpful. Period. Here's why:
WhatWhen a commenter leaves a note like the above, they probably means, ismean something more like:
Sites like these often do a poor job of teaching you the basic foundations of C++, which makes it harder to understand more complex topics. You should make sure you've really learned the fundamentals, like in a book, if you really want to learn how to answer this question and future ones like it.
But what an asker, a beginner, someone inexperienced, reads, is probably something more like:
You don't know enough to belong here, and your question is stupid. The time and effort you've invested isn't good enough and the way you're choosing to learn is dumb. Go away and come back when you're better, after you've spent money on a good C++ resource.
Obviously there's hyperbole there, but if you're preparing to leave a comment in this "learn another way" genre, pleaseyou've gotta understand how absurd it soundsa comment like this may sound to someone who, if we assume the best, is earnestly trying to learn and understand C++ (or ${other tool}) with the resources that they know, or were recommended, or have access to.
People learn differently, and differentvarious resources will speak to and teach different folks to differentdiffering levels of effectiveness. When you just say "go buy a book", you're speaking from an extremely narrow, classical viewpoint, and you've completely misunderstood, or failedprobably failing to represent, the core goal of your critique/ advice: why a book might even be helpful to the asker in the first place.
There's nothing magic about a book, just like there's not anything intrinsically evil about these sites– it's all always in the application. You may have had awesome experiences with book learning– great! Maybe the asker really would benefit from a book. The point is: it doesn't matter if your comment emphasizes a particular learning style or format over why it would be beneficial.
Comments which do nothing more than say, fundamentally, "what learning you've done isn't good enough" or "you're not learning in the right way" are not helpful, are not kind, and come across as actively harm the site, its reputation, and its usershostile at worst.
Just as we should Answeranswer with context, absolutely, but comments like these often fundamentally lack that very same context that could possibly make them genuinely helpful.