Quantcast
Channel: Stories by Paul Heintzelman on Medium
Viewing all articles
Browse latest Browse all 25

The point I was trying to make in my example is there is value in following the convention even if…

$
0
0

The point I was trying to make in my example is there is value in following the convention even if you disagree with it. Because common libraries are not going to follow the same snake case rule that you are using. Which means if you use any common library your code will be inconsistent.

Anytime a programmer chooses to deviate from the convention of a language they have to decide that what they gain from going rouge is greater than what they lose from consistency.

And in my opinion using snake_case for non callable variables isn’t worth the lose of overall consistency.

Also as you point out in your example a variable shouldn’t be called sendAddress. Non-callable variables shouldn’t start with verbs.

This rule already makes the distinction between functions and everything else.

A developer may fail to follow this rule but they may also fail to follow the snake case rule.


Viewing all articles
Browse latest Browse all 25

Trending Articles