3 ms·
I rarely reassign local variables too. (Other then the set to null as a fallback then set again in a branch “pattern”). The only excuse is when I am doing some
by quickthrower2 4y ago
I rarely reassign local variables too. (Other then the set to null as a fallback then set again in a branch “pattern”).
The only excuse is when I am doing something algorithmic and that would improve the performance.
By extension I prefer local variables over class state and static state and other “self managed lifetime” stuff like that.
And I am a GC blub programmer, I don’t use Rust or C.
- throwaway2037 4y agoYou wrote: <<GC blub programmer>> This is a great expression! Hat tip to Joel Spolsky for his blub programming language paradox. I know the feeling. When you read too much HN, you think the whole world is writing C & Rust.
- quickthrower2 4y agoThanks… I was being tongue in cheek of course.