The trouble is, if you’re going to reply that way, you should strive to first answer the question, as asked. If the answer is bad practice, of course, you should mention that.
That’s the respectful way to handle a misguided question, in my opinion. Give the reader both solutions, explain why the alternate is better, and leave it to the reader how to proceed from there.