An underrated but surprisingly useful feature. Makes it easy to make sure that identifiers in strings get changed as the code does. Generally the identifier should need to be well scoped. This helps prevent typos too.

Related: un-commented identifiers in comments

Examples

C#

string x = nameof(foobar)

Swift DocC