Giving Names to Character/String Literals [VU3]

Giving Names to Character/String Literals [VU3]

Tip VU3

String literals tend to communicate more than numeric or boolean literals by default, but they can still be unclear at times and benefit from having names communicating intent. Single-character literals might sometimes communicate more than numeric literals, but they can often be cryptic too. In many cases, it can be beneficial to give names to character or string literals.

See examples below:

 

Insights from every commit ad.png