76.1k views
0 votes
Using the Internet, search and discuss why naming conventions are important and why programmers should consistently follow them. What problems can arise in naming variables if one convention is not followed.

User Matt Ellen
by
5.0k points

1 Answer

5 votes

Answer:

Answered below

Step-by-step explanation:

Some variable naming conventions include;

1) Variable should begin with either a letter or an underscore.

2) Variables having multiple words should have the first letter of every word after the first word, capitalized. This is the camelCase style.

3) variables should not be named after any of the inbuilt keywords except on special operations to override the original function of such keyword.

4) variable names are case-sensitive.

The importance of following these conventions is to maintain readability and consistency of code. Failure to follow these conventions may lead to chaotic codes, bugs and inefficient performance.

User Girish Hosamani
by
4.5k points