2 ms·
Yes there is, it's called scope and it's super easy to keep track of? In fact, you have to go out of your way to share a reference if you scope it.
by Etheryte 3y ago
Yes there is, it's called scope and it's super easy to keep track of? In fact, you have to go out of your way to share a reference if you scope it.
- pkolaczk 3y agoIn languages like JS, Java, Python is trivial to accidentally make an object escape the scope by storing a reference in a field of another object that outlives the scope. And it can be another developer 3 months later that can introduce a bug, not knowing about your clever object reuse.