Re: Namespace clobbering internals

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

Matt Lewis wrote:
> 
> A better solution might
>  be to reserve a namespace for built-ins.  Maybe something like, "eu".
> 
> So your example might become:
> }}}
<eucode>
>   include pgsql.e as pg
>   include mysql.e as my
>   pg:close()    -- pgsql.e's close function
>   my:close()    -- mysql.e's close function
>   eu:close()    -- reserved built-in namespace, use the built-in
>   close()       -- error, multiple definitions
> </eucode>
{{{


Yes, that's a good solution. I tried to follow the internals about how
namespaces work and have failed to have it click yet. Can we make this change?
All internals have a reserved namespace, eu, that can optionally be used if the
programmer sees the need.

As you pointed about about my solution, it will break code and take away some of
the benefit, but adding a namespace to internals should not break anything and
only solve problems.

What would it take to do this? If you want to do it, or maybe give me a few
pointers then I can play with doing it. Your call.

--
Jeremy Cowgar
http://jeremy.cowgar.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu