Hacker News new | ask | show | jobs
by lifthrasiir 1552 days ago
Even in typed languages `names` and `name` are too similar to slow code reading down.
2 comments

Exactly this. In many languages the compiler will help you.

But this has bitten me in Ruby, JavaScript and PHP several times. Runtime errors and downtime. Most recent: autocompled some updatedCartsItems when it had to be UpdatedCartItems. Both were used in the same class. Had they be named sensible, like CartListWithUpdatedItems and UpdatedItemList or something better, I'd have saved myself hours of WTFing through CI logs.

Disagree, but in that case wouldn't `nameList` and `name` be best?