Re: Namespaces
- Posted by Irv <irv at ELLIJAY.COM> Oct 23, 2000
- 558 views
On Mon, 23 Oct 2000, David Cuny wrote: > How do people prefer namespaces to behave? ... > import test.e into foo > import test.e into bar Further experimentation shows that this is a much more involved question than I at first thought. It'll take several posts to explore the possibilities, but let's start by evaluating the simplest alternative: As I see it, there could be a couple of reasons a programmer might do multiple imports if references to foo and bar will point to the SAME variable space: 1. A mistake.(forgot it was already included) 2. Obfuscation of code. foo.name = "Fooman" bar.name = "Barman" ? foo.name => "Barman" Not something I normally do (intentionally). Besides, there's always shroud. I see no upside to this, therefore if multiple includes are going to point to the SAME space, they should be prohibited. In exploring what happens if multiple includes point to DIFFERENT instances of the included variables, we need to examine three different areas: stand-alone variables sequences routines I have some experiments in each of these areas which I'll post individually. Regards, Irv