On Sep 5, 2008, at 3:23 PM, Rich Hickey wrote:
> I didn't think about the plural angle - anyone else bothered by that?
> The alternative is defnamespace.
I like the clarity of defnamespace over defns. The only knock I see
against defnamespace is its length (in characters). I think that
length is justified by the fact that its arguments will nearly always
be much longer and that it will only be used once per namespace.
This is how it appears in an actual call:
(clojure/defnamespace clojure.contrib.sql
(:import
(java.sql DriverManager Connection PreparedStatement ResultSet)))
The "clojure/" qualifier is necessary in case the namespace doing the
loading doesn't have clojure referenced. Rich do you see any merit in
treating "defnamespace" (or "defns") specially so that it's
effectively referenced by every namespace. This would allow us to
remove the clojure/ and still allow every lib to load reliably
regardless of the current namespace. That would allow the above call
to be:
(defnamespace clojure.contrib.sql
(:import
(java.sql DriverManager Connection PreparedStatement ResultSet)))
I like both ways, but I thought I'd mention the possibility of
shortening it.
--Steve
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---