On Tue, Aug 6, 2013 at 7:51 AM, Greg <g...@kinostudios.com> wrote:
> (ns one.fresh-server
>   (:refer-clojure :exclude [ancestors printf])
>   (:use core.matrix
>         [ring.adapter.jetty :only (run-jetty)]
Except most code I've seen uses (nested) vectors not lists.

>         [ring.middleware.file :only (wrap-file)]
>         [ring.middleware.file-info :only (wrap-file-info)]
>         [ring.middleware.stacktrace :only (wrap-stacktrace)]
>         [ring.util.response :only (file-response)])
>   (:require [one.reload :as reload]
>             [one.middleware :as middleware]
>             [net.cgrand.enlive-html :as html])
>   (:import (org.apache.maven.artifact.resolver ArtifactResolver)
>            (java.io File))))
>
>
> New School:
>
> (ns two.namespace
>   [clojure [core :except (ancestors printf)]]
>   [core [matrix math bs]] ; same as (:use (core matrix math bs))
>   [[some-ns]] ; same as (:use some-ns)
>   [ring.adapter.jetty (run-jetty :as jetty)]
>   [ring.middleware.file ("warp-*")] ; refers all functions beginning with
> "wrap-"
>                                     ; regex not supported because too
> confusing
>   [ring.middleware.file-info (wrap-file-info)]
>   [ring.middleware.stacktrace (wrap-stacktrace)]
>   [ring.util.response (file-response)]
>   [one reload middleware]
>   [net.cgrand enlive-html :as html]
>   [org.apache.maven.artifact.resolver ArtifactResolver]
>   [java.io File InputStream])

Why the arbitrary change from commonly used nested vectors to nested lists?

Given Timothy's protocol example, do you agree that Clojure
namespaces/vars and Java packages/classes need to be treated
differently?

Personally I think your syntax is far more cryptic than the status quo.

In my production code base (~14kloc + 4kloc for tests), we have just
one instance of :refer-clojure so I'd consider that to be a special
edge case that should _not_ be merged into another syntax. We have
four :use's at the moment, all in legacy test code. Everything else is
either :require or :import (and we only have a dozen of those). We use
(:require [... [...]]) and (:import (...)) consistently. It's clear
and easy to understand.

Deprecating (not removing) :use from ns seems reasonable but I really
don't see any value in a new unified syntax - esp. since it would have
to support the legacy syntax for several releases alongside (and then
you'd have to consider whether mixed syntax should be supported -
ugh!).
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to