4 ms·
I value clarity and explicity a lot. And I’m someone who generally lines to think about proper naming of a variable twice to make it easier for future readers o
by hennsen 9y ago
I value clarity and explicity a lot. And I’m someone who generally lines to think about proper naming of a variable twice to make it easier for future readers of code.
At the same time when reading
> How can a = a + 1? That’s like saying 1 = 2.
I think:
Well, depends how you interpret it.
If the translation is „we state, that from now on, a is the previous value of a plus 1“ it’s totally ok.
Not a big difference from saying
a = b + c
So i‘m not sure if the usefulness if changing all languages to using := is that high that it’s worth to think about changing it in current languages - and even when inventing a new language I’m not sure if it’s helpful.
I also wonder if reassignment, beside counters that need to be changed with iteration/ appearance of the event to be counted, is a thing that should generally be avoided if possible. Ok maybe in general everything where data is transformed in iterations...