Discriminator
In computing, a discriminator is a field of characters designed to separate a certain element from others of the same identifier. As an example, suppose that a program must save two unique objects to memory, both of whose identifiers happen to be foo
. To ensure the two objects are not conflated, the program may assign discriminators to the objects in the form of numbers; thus, foo (1)
and foo (2)
distinguish both objects named foo
.
This has been adopted by programming languages as well as digital platforms for instant messaging and massively multiplayer online games.
In instant messaging
A discriminator is used to disambiguate a user from other users who wish to identify under the same username.
Discord
On Discord, a discriminator is a four-digit suffix added to the end of a username. This allowed for up to 10000 user accounts to take the same name.
Transition away from discriminators
In 2023, co-founder Stanislav Vishnevskiy wrote on a company blog post about the technical debt caused by the discriminator system, stating that the system resulted in nearly half of the company's friend requests failing to connect. The platform implemented discriminators in the early days of the service, he wrote. When the platform was initially introduced, the software developers' priority was to let its users take any username they want without receiving a “your desired username is taken” error. Discord had no friend system at first, thus letting people take names in different letter cases, making usernames case-sensitive.[1]
Discord also introduced a global display name system, wherein a user may input a default nickname to be shown on top of the messages they sent in lieu of their platformwide username, Vishnevskiy touted on Reddit.[2]
The platform created a transition process to a system of pseudonyms wherein all new usernames would be case-insensitive lowercase and limited to the ASCII characters of A–Z, 0–9, the full stop and the underscore. The transition would happen over the course of months, with the accounts that were registered the oldest, and paid subscribers, receiving the opportunity to reserve their name earlier.
This change was criticized online for being a step backward, as users could be a risk of being impersonated. A notable indie game studio noted that it could no longer claim its own name on the platform.[3] Discord pointed to its processes for users with high visibility and longstanding business relationships with the company for reserving a username under the new system. The old discriminator-oriented system also mitigated the rush to get unique usernames for sale on the black market, leading to swatting and online harassment.[4][2]
In digital distribution
Battle.net implements a suffix of four-digit numbers to its usernames.
In computer data storage
Common Object Request Broker Architecture
A discriminator is a typed tag field present in the Common Object Request Broker Architecture, the interface description language of the Object Management Group. It exists as type and value definitions of tagged unions that determine which union member is selected in the current union instance. This is done by introduction of the classic C switch construct as part of the classic C union.[5][6] Unlike in some conventional programming languages offering support for unions, the discriminator in IDL is not identical to the selected field name. Here is an example of an IDL union type definition:
union Register switch (char) { case 'a': case 'b': short AX; case 'c': long EAX; default: octet AL; };
The effective value of the Register type may contain AX as the selected field, but the discriminator value may be either 'a' or 'b' and is stored in memory separately. Therefore, IDL logically separates information about the currently selected field name and the union effective value from information about the current discriminator value. In the example above, the discriminator value may be any of the following: 'a', 'b', 'c', as well as all other characters belonging to the IDL char
type, since the default
branch specified in the example Register type allows the use of the remaining characters as well.
Other interface definition languages
The Microsoft Interface Definition Language also supports tagged unions, allowing to choose the discriminator via an attribute in an enclosing structure or function.[7]
Alternatives
A friend code is a unique twelve-digit number that could be exchanged with friends and be used to maintain individual friend lists in each video game. Friend codes were generated from an identifier unique to a copy of a game and the universally unique identifier corresponding to that of a user's device.[8]
References
- ↑ Mehrotra, Shikhar (May 7, 2023). "Discord’s New Usernames: Everything You Need To Know About The Update". Screen Rant. https://screenrant.com/discord-new-username-change-discriminators-tag-update/.
- ↑ 2.0 2.1 Shakir, Umar (May 6, 2023). "Discord’s username change is causing discord". The Verge (Vox Media). https://www.theverge.com/2023/5/6/23711332/discord-username-changes-community-backlash-handles.
- ↑ Wright, Steven (May 22, 2023). "Discord's Controversial New Policy Has Prevented A Dev From Claiming Its Own Name". GameSpot (Fandom, Inc.). https://www.gamespot.com/articles/discords-controversial-new-policy-has-prevented-a-dev-from-claiming-its-own-name/1100-6514438/.
- ↑ Gerken, Tom (May 4, 2023). "Discord plans to make everyone change their username". BBC News (British Broadcasting Company). https://www.bbc.com/news/technology-65483184.
- ↑ Object Management Group (March 12, 2004). "CORBA/IIOP Specification 3.0.3". OMG.org. http://www.omg.org/technology/documents/formal/corba_iiop.htm.
- ↑ "CORBA 3.0 - IDL Syntax and Semantics chapter". OMG.org. March 12, 2004. http://www.omg.org/cgi-bin/doc?formal/02-06-07.
- ↑ "Microsoft discriminator attribute documentation". Microsoft Learn. October 25, 2019. http://msdn.microsoft.com/en-us/library/aa367275(VS.85).aspx.
- ↑ Studdard, Kim (April 19, 2023). "How to Add Friends on Nintendo Switch: In 5 Easy Steps With Photos". https://www.msn.com/en-us/entertainment/gaming/how-to-add-friends-on-nintendo-switch-in-5-easy-steps-with-photos/ar-AA1a2FaN.
![]() | Original source: https://en.wikipedia.org/wiki/Discriminator.
Read more |