Quote:

Is there any mileage in the idea of being able to drill down to a local constant or variable within a function/sub within a library, or is that going too far? This might allow the script to grab a variable from within a remote function and use it or modify it locally. I'm not sure how this might be used, or whether it's taking object programming too far.




It's actually the complete reverse of object programming

The idea of an object is that the innards (code, data) is absolutely private and untouchable. The object might expose data as properties, but they are abstracts of what the real data is in the object.

Variables are not persistent - when a function exits they are destroyed so there is nothing to access or change.

If you can think of a useful application of accessing private function data that can't be met by other methods then post again. There's no point in adding functionality which will never be used