It's kind of interesting that the way you use objects here allow you to write code similar to how switch statements work in some languages.
As an added bonus, writing it like this may let you implement a different feature present in some languages, that checks if a switch has covered all possible inputs (usually used with enums). This could prevent stuff like, having one entry misspelled, or somebody adding something somewhere, but not updating all the linked "switch"es.
Though depending on the implementation, this may be even more work or cause more trouble.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It's kind of interesting that the way you use objects here allow you to write code similar to how switch statements work in some languages.
As an added bonus, writing it like this may let you implement a different feature present in some languages, that checks if a switch has covered all possible inputs (usually used with enums). This could prevent stuff like, having one entry misspelled, or somebody adding something somewhere, but not updating all the linked "switch"es.
Though depending on the implementation, this may be even more work or cause more trouble.