Inform them in a short way why the approach taken has negative side effects (and site the source if possible)
Inform an alternative approach that would yield more desirable results and explain why (clearer code, easier to maintain, smaller memory footprint, etc)
Basically you are not arguing what is wrong and right, you are expressing your opinion on how it can be improved. This is the approach I take when helping others and how I expect to be handled when being corrected as well.
When you simply say "its wrong" and don't do the diligence of providing explanation and direction, you are missing an opportunity to educate without coming off as pompous
Trying to be short and sweet with my answer:
Basically you are not arguing what is wrong and right, you are expressing your opinion on how it can be improved. This is the approach I take when helping others and how I expect to be handled when being corrected as well.
When you simply say "its wrong" and don't do the diligence of providing explanation and direction, you are missing an opportunity to educate without coming off as pompous
Totally agree, I'd never say "it's wrong" without providing extra context and explanation on WHY it's wrong.