Re: Downside to namespacing
- Posted by "Kat" <gertie at visionsix.com> Aug 23, 2004
- 425 views
On 23 Aug 2004, at 11:25, irv mullins wrote: > > > posted by: irv mullins <irvm at ellijay.com> > > I have a program which 'includes' a module. Let's call it lv.e. > The module handles listviews, exporting only the variables > necessary to add, scroll, and respond to list events. > > I want to use two listviews in my program. Both use the routines in lv.e. > I can't include the lv module twice, with different namespace qualifiers, > but I can copy the module under a new name, and then include them with > qualifiers: > > include lv1.e as view1 > include lv2.e as view2 > > So far so good (well, not really, but it works). > > Now, when I want to refer to the variables in view1, for example, > I must write: > > > view1:add_row(view1:store,view1:iter,view1:this,view1:that,view1:the_other....) > > The view, as well as each variable must be individually qualified. This is a > simple example, I'm sure you can think of others where the qualifying would > get > even more complex. Why can't we say: > > with view1 do > add_row(store,iter,this,that,the_other) > end with > > Doesn't that make more sense? > Perhaps someone can see an even better way of doing this. Won't work, i tried suggesting "with" years ago, along with "repeat-until" and "goto" (which would have been a fine replacement for "exit", "repeat-until" and "while-do"), string execution, and local includes. Well, it *will work*, but RobC isn't interested in these things. Kat