Re: rant // OE scope \\ forked out of 500 Rosetta

new topic     » goto parent     » topic index » view thread      » older message » newer message

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.

Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu