Dec-30-2021, 07:30 AM
Can't stress enough how much of a bad idea something like this is (as has been suggested previously), because you can end up with overcomplicated code that's difficult to understand. In the majority of programs, you really don't need to use things like
I do speak from experience too - I had to work on a system many years ago where I really had no choice but to use
You'd do well to listen to people's advice when something is a bad idea and spend more time on learning useful techniques.
locals
, etc. as there are better ways to design things.I do speak from experience too - I had to work on a system many years ago where I really had no choice but to use
locals
and friends. The reason was the other parts of the codebase I needed to use did some very strange things so that was the only way to get access to the data I needed. The code I had to write was unreadable really and unfortunately, it would have been too big a job to rewrite the rest in a more sensible way (and the code was poorly tested, making matters worse).You'd do well to listen to people's advice when something is a bad idea and spend more time on learning useful techniques.