If you have a valid solution, you should always be welcome to post an answer.
The goal of StackExchange is to give people answers. This includes not only the original asker of the question, but everybody else who sees the question later. Even if your answer isn't the OP's perfect solution, it may be a better help to somebody else who comes along later.
This doesn't mean that all answers are created equal, but, that's what voting is for. You should be welcome to post a valid answer, and, if a better one comes along, it will probably be voted higher than yours and/or accepted. The system works.
There's the answer for your (generally applicable) question, but I'd like to address something specific to your case:
From the BSE Help Center, we learn that comments should be used for "constructive criticism that guides the author in improving the post" or "adding relevant but minor or transient information to a post".
It appears to me that the initial comment by the other user was intended as constructive criticism. It wasn't really received that way, though1, and your resulting conversation escalated to this comment by the other party:
Maybe it's just me, but I like to have my answers to be proper, not "something".
after which you were accused of being rude. My guess is that this is what prompted you to ask this question, with its emphasis of "professional" vs "what works".
In my opinion, one of the things that makes BSE great is the mix of professional and hobbyist users that we have here, and much of the time, there is more than one right answer to a question (each of those is a separate link). As stated above, there is sometimes a single "best" answer, but that doesn't invalidate all of the others.
Additionally, I think that your answer was more than just "something." It was a well-formatted, properly explained attempt at solving the question: the quality of content we want on this site. Just because your answer wasn't the "proper"2 way to do it doesn't make it bad3.
1 which is understandable, since applying it would have essentially meant changing your entire answer.
2 additionally, in this particular case, I don't think that there is a single "proper" way to do it.
3 "bad" answers are those that are "dangerously incorrect." I don't think that an answer that is not optimally efficient qualifies as "dangerously incorrect."