Re: Do you currently use namespaces?
Jeremy Cowgar wrote:
>
> Matt Lewis wrote:
> >
> > It's not a matter of including it twice. His point was that your code
> > should
> > include what it needs. Your statement is actually the antithesis of modular
> > programming, IMHO. Each module should explicitly declare its dependencies.
> > Euphoria has never required this, though it will at least generate a
> > warning in 4.0.
> >
>
> In addition, if you use namespaces, you can forget the fact 100% that anything
> is global throughout the entire program. For instance:
Almost. Sort of. You can still get in trouble [theoretically] with
multi-file libraries. If, say win32lib (not picking on it, just that's
it's the most popular multi-file library out there) had naming conflicts
within other files that were part of the library (w32foo.ew and w32bar.ew),
you would have to include those and add a namespace in addition to including
win32lib. I doubt anyone has ever encountered this exact problem, but
someone on the internet was wrong again. :)
Matt
|
Not Categorized, Please Help
|
|