On this page.... RSS 2.0 | Atom 1.0 | CDF
# Monday, March 7, 2005

It's a beautiful problem to have--trying to decide how to organize your code into namespaces (and even classes) meaningfully.  But it can also be paralyzing.  I think I could sit here for hours debating the merits of one way of organization over another until I come up with the perfect approach.  But then, I'd be wasting a lot of time.

So in order to avoid namespace paralysis and not waste time, here is one approach you can use to get past it and move on and yet leave it open to relatively easy change later.  Group related code into one namespace and then use using (Import in VB) statements in the consuming code to use that namespace.  Then if at a later time you find that perfect name for your space, you can change it and only need to update the using/Import statements.  Of course, you run the risk of naming conflicts at that time, but this isn't the best of all possible worlds either.  Deal with it. 

Don't know if anyone else runs into this problem, but I'm in it now and need to move on, so here's my pep talk. Hope it helps some other overly analytical types like myself. :)

Monday, March 7, 2005 2:08:14 PM (Eastern Standard Time, UTC-05:00)  #    Disclaimer  |  Comments [2]  | 
Saturday, March 12, 2005 7:03:04 PM (Eastern Standard Time, UTC-05:00)
I have a Modest Namespace Proposal for you..

http://www.codinghorror.com/blog/archives/000188.html
Sunday, March 13, 2005 1:40:56 PM (Eastern Standard Time, UTC-05:00)
Abusus non tollit usum. The abuse of a thing does not nullify its proper use. Sure namespaces can be misused, and in fact, it is that possibility that makes me probably over-analytical about choosing them; however, I do think that it is best to organize code into namespaces when it makes sense to do so. At the very least, you should have a root namespace that distinguishes your code from others.
Comments are closed.

Disclaimer
The opinions expressed herein are solely my own personal opinions, founded or unfounded, rational or not, and you can quote me on that.

Thanks to the good folks at dasBlog!

Copyright © 2019 J. Ambrose Little