1. New namespace keyword

With Matt clarifying that namespaces are used optionally, I think the new
namespace keyword makes a lot of sense. For instance:

---- greeter.e
namespace greeter
global function hello()
  -- code
end function


---- myprog.e
include greeter.e
greeter:hello() -- works
hello() -- works

include greeter.e as g
g:hello() -- works



Matt,

How difficult of a change to the code do you think this is?

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

new topic     » topic index » view message » categorize

2. Re: New namespace keyword

Jeremy Cowgar wrote:
> 
> With Matt clarifying that namespaces are used optionally, I think the new
> namespace
> keyword makes a lot of sense. For instance:

<snip>

> How difficult of a change to the code do you think this is?

Not too difficult, but I think we need to explore this idea some more to make 
sure that it makes sense, first.

Matt

new topic     » goto parent     » topic index » view message » categorize

3. Re: New namespace keyword

Matt Lewis wrote:
> 
> > How difficult of a change to the code do you think this is?
> 
> Not too difficult, but I think we need to explore this idea some more to make
> sure that it makes sense, first.
> 

Matt, how do we proceed?

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

new topic     » goto parent     » topic index » view message » categorize

4. Re: New namespace keyword

Jeremy Cowgar wrote:
> 
> Matt Lewis wrote:
> > 
> > > How difficult of a change to the code do you think this is?
> > 
> > Not too difficult, but I think we need to explore this idea some more to
> > make
> > sure that it makes sense, first.
> > 
> 
> Matt, how do we proceed?

I think we need to take the pro argument, and make sure that it really is
a pro.  Would it really be beneficial to have these 'automatic' namespaces?

We also need to think about ways that it could fail.  What happens if two
files use the same default?  what if you include two different versions of
the same file?  What if the default namespace is explicitly assigned to
something else?

Matt

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu