RE: Downside to namespacing

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

Mike wrote:
> 
> Irv,
> 
> I think a possible solution could be to do with the programming 
> approach.
> 
> > 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. 
> 
> (please correct me if I'm wrong) but if lv.e handles a single listview 
> (not listviews) and those exported variables are intrinsic to it's 
> operation then the module can only ever support that one object - which 
> is why you currently need 2 modules to manage 2 listviews.

You are correct, but only because that's the way Euphoria does things.
Looked at logically, if I take one file and copy it under a new name,
I now have two files, identical in every way except name. I can 
include those two using different namespace qualifiers, and Euphoria 
handles it with no problem. In other words, variables with identical names 
are NOT the same variable, because they are prepended with the namespace 
qualifier.... A:foo and B:foo, for example.

Now, the ONLY difference between reading in two identical files with 
different names, and reading in one single file twice, prepending 
each with a different qualifier, is that Euphoria refuses to do it!
That's all.

I'll respond to your other suggestion when I have time to actually 
code it.

Irv

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

Search



Quick Links

User menu

Not signed in.

Misc Menu