If a user asks a question along the lines of
I would like to do X with Y. How can I make Y do this?"
is it appropriate to answer with an alternative or more straightforward way to do X, even if it doesn't directly answer the "How can Y do this?" part?
I can't see how it falls into any of the criteria for deletion:
commentary on the question or other answers ✘
asking another, different question ✘
“thanks!” or “me too!” responses ✘
exact duplicates of other answers ✘
barely more than a link to an external site ✘
not even a partial answer to the actual question ?
I can see a bit of a grey area for the final one. Is it an exact answer? No. Does it partially answer the question? Yes. It's just another form of the XY problem, and if it can help the user asking the original question (or users finding the question later), I feel it's a useful addition to the site.
(Full disclosure, I had such an answer deleted, I'm sure I'll get over it but for future reference I'm interested in whether these answers are discouraged and if so, why?)
EDIT: I am happy with my answer being deleted and this is in no way a plea for it to be restored, I'm just looking for clarification for the future.