What is the purpose of using proper names for identifiers ?Explain | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

What is the purpose of using proper names for identifiers ?Explain

7th Sep 2016, 5:38 PM
Himanshu Kumar
Himanshu Kumar - avatar
3 ответов
+ 1
It helps you to remember the purpose of the variables and functions. It also helps others to understand your code.
7th Sep 2016, 5:51 PM
Zen
Zen - avatar
0
thanks
7th Sep 2016, 5:53 PM
Himanshu Kumar
Himanshu Kumar - avatar
0
which is more understandable? void f(int& a, int& b) { a ^= b; b ^= a; a ^= b; b ^= a; } void swapTwoNumbers(int& num1, int& num2) { num1 ^= num2; num2 ^= num1; num1^= num2; num2 ^= num1; }
10th Sep 2016, 2:21 PM
trickybear