Re:Game Jam 2 Results
by vanderZwan on Friday September 09, 2022 @09:32AM
(#32778991)
Of course I have encountered dependent variables, but if I have a long chain of unused variables that means that either that code is ready to go, or the code organization needs refactoring.
[ Parent
| on HN ]
You seem to be missing the whole point being made — they are unused because of (temporary) changes during prototyping.
Re:Game Jam 2 Results
by vanderZwan on Friday September 09, 2022 @11:45AM
(#32780638)
Ah yes, prototyping. The stage of coding where one has lots of snippets of code meant for trying things out quickly. Definitely a context full of long chains of dependent variables.
One might imagine prototyping new functionality in a existing, complex, codebase..
Dude, it is about debugging, or work in progress...
Did you ever tried to debug some issue and start commenting stuff to try and find the problematic area? Hell when I comment stuff soemtimes private function will get unused , so with a shit compiler you would need to also comment the private functions, remove unused classes etc.
In my code I assure the linter will say 0 warnings.
At first you have a long chain of used variables that end up into a value used somewhere.
If then you refactor away that single final value you need to delete all the previously used variables that now need to be "deallocated" by you.