Re: Do you currently use namespaces?

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

c.k.lester wrote:
> 
> Matt Lewis wrote:
> > d,f and g should make certain to include any file they need.  Then, even if
> > your main file doesn't use one of the dependencies, you'll still have 
> > working code.
> 
> I can see the rationale here; I guess I just hate the idea of doing this:
 
<snip>

> But, really, if you're going to depend on a lib, I guess you really should
> include it explicitly. :/

Yes.  It has several benefits.  Some are to you, the original coder:

* It makes it easier to see what the dependencies really are.  
* It helps resolve some of the 'order of include' issues you've run into.

Some are for your downstream users:

* If they want to use one of your modules apart from your library, it's 
  easy to see the dependencies, and ensure they are correct.  See the 
  history of win32lib's memory management code for an example.
* It prevents conflicts that could only be resolved by having an end user
  edit 3rd party code.

BTW, in 4.0, not including the files (directly or indirectly) will result in a 
warning.

Matt

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

Search



Quick Links

User menu

Not signed in.

Misc Menu