2

Is using an underscore in user mentions as a replacement for a space a valid practice, and if not, then why? It feels obvious for me to do so, however the help on using @username does not say anything about this.

7
  • 1
    You don’t have to use spaces, you can just write the username in one word.
    – user569408
    Commented Dec 26, 2019 at 9:54
  • @DarklingArcher OK then. Commented Dec 26, 2019 at 10:32
  • 1
    @Rob It briefly mentions that underscore can't be used this way but does not tackle the problem otherwise, so I wouldn't say these two are duplicates. Commented Dec 26, 2019 at 11:03
  • @Rob But the difference is that the underscore is commonly understood as space in situations where the space can't be used. See the Wikipedia page about underscore, I'm not making this up. Commented Dec 26, 2019 at 15:01
  • DarklingArcher, you are allowed (it is "valid") to call yourself: "DarklingArcher", "Darkling_Archer", "Darkling␠Archer" (using the correct character), "Darkling␣Archer" (a commonly understood substitute) - all are equally valid and entirely different names. Just like DarklingBowman is a different name. Four others agree with me, you are most welcome to edit your question and try to reopen it.
    – Rob
    Commented Dec 26, 2019 at 15:31
  • @Rob You're saying that ironically just because my name doesn't contain a space. Commented Dec 26, 2019 at 15:48
  • Perhaps you prefer the explanation that underscores and asterisks are markdown. When using just one where is the delineation? --- Example sentence: "Hello DarklingArcher, testing 123". Now with underscores before 123 and before the capital "A" in your name: "Hello Darkling_Archer, testing_ 123", and with double asterisks: "Hello DarklingArcher, testing 123". --- See here: meta.stackexchange.com/editing-help#italics-bold
    – Rob
    Commented Dec 26, 2019 at 15:59

1 Answer 1

6

No it is not. Doing so will result in the notification not working. One has to omit space, as does autocomplete. If one includes the space it will often still work, as the algorithm tries to match the start of the string. But including an underscore (same for other characters) will break notification.

To make the "often" explicit, if the part before the space is at least three characters long it will notify some user (and the intended one except if there is another user in the conversation that has a similar user name).

To answer the comment as regards the reason, this is difficult to answer with certitude (and I am not personally familiar with such things). Maybe for simplicity of the matching algorithm. Then, if I recall correctly, underscore is not a valid character in a username, thus indeed it could be done without too much trouble I suppose. Yet, then somebody might want to use a hyphen instead of an underscore, and so on. I think in the end it is just what seemed the right thing to do for the person that implemented it way back then. They might well have decided something else then.

5
  • Why though, considering that this usage of underscore is common elsewhere? Commented Dec 26, 2019 at 9:59
  • 2
    @OldPadawan No, the spaces aren't replaced. These are just ommitted. Commented Dec 26, 2019 at 10:03
  • 1
    @OldPadawan It worked because it's enough to put the 1st part of my nick after the @. Commented Dec 26, 2019 at 10:09
  • @DarklingArcher where is it common? It's not common for me at all. Commented Dec 26, 2019 at 10:48
  • 1
    From the Wikipedia: "This character [underscore] is often used to create visual spacing within a sequence of characters, where a whitespace character is not permitted (e.g., in computer filenames, email addresses, and in Internet URLs)." Commented Dec 26, 2019 at 10:54

Not the answer you're looking for? Browse other questions tagged .