That's absolutely fine to do. It distracts from the actual content of a post, and offers possibilities for off-topic discussion and flamewars. We don't want that.
Although in this case, the original answer was a pretty severe example, and should have probably been deleted. (Yes, I know it's a self-answer, but maybe the OP can phrase it a bit more elegantly.)