3 ms·
In many ways code is similar to math, and in math they mostly use one-letter identifiers. And there is a very good reason for that. I have seen texts where auth
by Koshkin 11y ago
In many ways code is similar to math, and in math they mostly use one-letter identifiers. And there is a very good reason for that. I have seen texts where authors tried to make formulas more reader-friendly by replacing letters with words, but in that case they might as well have replaced formulas with prose...
- smt88 11y agoCode has similarities to math, but it's not math. function a(b) ... requires reading the whole function definition to understand what it does. function createNewUser(userInfo) ... tells you exactly what it is and what it does. Especially if you're dealing with pure functions, it makes reading and understanding a code base much faster (and decreases the need for documentation).
- Retra 11y agoMath notation isn't as much concerned with implementation as it is the architecture.