Some time ago I reported an issue about Discourse not automatically adding spaces behind usernames when @mentioning them. The discussion afterwards prompted me to do comprehensive research on how other platforms do @mentions.
See my detailed reply in the Discourse forum:
I’d be interested in your input here. What do you think about the conclusion? Did I miss anything? How do you do it in your projects?