▲ | ParetoOptimal 3 days ago | |
> All that really matters is consistency. Let a team make some decisions and then just move forward. Not so! Amount of tokens correlates to perceived code complexity to some. One example is how some people can't unsee or look past lisps parenthesis. Another example is how some people get used to longDescriptiveVariableNames but others find that overwhelming (me for instance) when you have something like:
Above isn't bad, but imagine variables named that verbosely used over and over, esp in same line.Compare it to:
The second example loses some information, but I'd argue it doesn't matter too much given the context one would typically have in a function named `userSignup`.I've had codebases where consistency required naming all variables like `firstNameInputField` rather than just `firstName` and it made functions unreadable because it made the unimportant parts seem more important than they were simply by taking up more space. |