Re: rant // OE scope \\ forked out of 500 Rosetta
- Posted by petelomax 1 week ago
- 95 views
I wonder if "line of sight" might be a more appropriate metaphor.
You've got rooms in buildings with doors and windows, and walls and hedges and fences and hills and mountains. You can also "cheat" with cctv, and maybe using a namespace is analogous to switching to a specific camera so you know you're looking in the right area, and you can see things that you wouldn't normally be able to see.
It is important that when you are tinkering around in your shed you do not accidentally pick up some critical nut and bolt from a nuclear reactor 20 miles away. Of course in the real world that would be physically impossible, but within a computer those kind of "obvious" barriers actually have to be created artificially. Scopes are the way the compiler models just that sort of requirement.
Paradoxically, scopes can be difficult to describe and/or understand, precisely because they are inherently obvious.