On Tue, Jul 5, 2011 at 6:01 AM, Stuart Halloway
<stuart.hallo...@gmail.com> wrote:
> (1) Use "require :as prefix" everywhere. This felt ugly at first, but puts
> pressure on naming in way that is beneficial as the codebase grows.

I've also started leaning toward that approach. At first I tended to
:use clojure.* namespaces and :require our own code with aliases but
now I'm moving more to :require on all namespaces, often without an
alias (on short ns names) and then using the long form in calls. In
other words, only using an alias if it really cleans up the code (one
tooling deficiency I noticed is that CCW won't recognize clojure.*
namespace functions if you use an alias and I find the color-coding is
worth more than the conciseness of the code).

> In general, I have found that namespaces should be larger than my OO
> intuition would have them be.

I'm beginning to find that. At first I was creating namespaces much as
I would have for classes but that soon produced long (ns) forms
requiring all the small namespaces so I backed off to less granular
namespaces and I'm finding that easier to manage.

I just saw Ken's note come in about "invalid contant tag 32" and
looking at the threads behind that, it looks like folks hit it when
they have "large" files but I'd be concerned about any single
namespace-based-API that grew that large - I would have expected to
break it down into a "public" API and a "private" implementation
namespace before files got that large. I guess it will be interesting
to see how this pans out as Clojure adoption continues to grow...
maybe that limitation should be endorsed and the compiler could issue
an "Error: your namespace is too big - please modularize your code!"
message as a way to keep namespaces to a maintainable length... :)
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/
Railo Technologies, Inc. -- http://www.getrailo.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to