Re: Namespace request

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

Jason Gade wrote:
> 
> Rob, can you change namespacing so that more than one file can be included
> into
> the same namespace?
> 
> Here is an example of what I want to do:
> 
> include misc.e as rds
> include machine.e as rds
> include dll.e as rds
> 
> Currently the interpreter gives an error.
> 
> Rationale: I want to use namespaces in a file that is intended to be included
> by another so as to avoid conflicts in user programs. But when I know that
> there
> will be no conflicts within the files that I'm including I don't want to make
> a new namespace for every single include. This will also help prevent
> namespace
> pollution by reducing the number of unique namespaces that a program needs to
> come up with.
> 
> --
> "Any programming problem can be solved by adding a level of indirection."
> --anonymous
> "Any performance problem can be solved by removing a level of indirection."
> --M. Haertel
> j.

Hi Jason,

I don't think agree with this idea.

Heres why:

What if you had two or more files with globals with the same name? If those two
files where assigned the same namespace how would you differentiate, for example,
between the "foo" routines, variables, or constants in the multiple files under
the same namespace? Or maybe there is something I'm not understanding here?

Now that Robert has agreed to fix, in my opionion, the biggest potential problem
with Euphoria, I think we should let him be with all the feature requests. I
don't want him to think that now that he's granted a feature that we will expect
more and more. Maybe that is the case for some people, but not with me.

I bet Robert has enough feature ideas to keep him going for many releases after
Euphoria v3.0. Lets let him use them all before requesting a whole bunch more.


Regards,
Vincent

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

Search



Quick Links

User menu

Not signed in.

Misc Menu