Namespaces
- Posted by David Cuny <dcuny at LANSET.COM> Oct 23, 2000
- 584 views
How do people prefer namespaces to behave? For example, imagine that you had a namespace option in Euphoria like this: import <file> into <namespace> that behaved like include does, but the imported code would have to be accessed through the namespace prefix. So if you had a file like this: -- test.e global integer number and you wrote: import test.e into foo import test.e into bar Would you expect 'foo.number' and 'bar.number' to reference the *same* variable, or different variables? My thinking is that it would be more along the lines of how Euphoria currently behaves to have them refer to the same variable. On the other hand, it's awfully convenient for each namespace to have it's own local data, like classes. Thanks! -- David Cuny