News for hackers. Stuff that matters.
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.
Re:Game Jam 2 Results by hhmc on Friday September 09, 2022 @09:53AM (#32779246)
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.
Re:Game Jam 2 Results by hhmc on Friday September 09, 2022 @02:24PM (#32783027)
One might imagine prototyping new functionality in a existing, complex, codebase..
Re:Game Jam 2 Results by simion314 on Friday September 09, 2022 @10:22AM (#32779608)
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.

Re:Game Jam 2 Results by afiori on Friday September 09, 2022 @10:18AM (#32779554)
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.