hi all,
What's the differences between those two snippets?
1.
(ns a
(require [a.b]))
2.
(ns a
(:require [a.b]))
They all works in my code!
thx~
--
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
I believe one is a directive and the other is a function.:require doesn't need the values to be quoted (:require xyz)require needs values to be quoted so that they're not evaluated when passed as arguments (require 'xyz)I could be wrong though. 06.12.2013, 18:17, "BillZhang"
Inside the ns form they are the same. Outside the ns form, only (require
'[a.b]) works (with quoting, as Kelker said).
Jonathan
On Fri, Dec 6, 2013 at 10:24 AM, Kelker Ryan theinter...@yandex.com wrote:
I believe one is a directive and the other is a function.
:require doesn't need the
You might find this useful:
http://blog.8thlight.com/colin-jones/2010/12/05/clojure-libs-and-namespaces-require-use-import-and-ns.html
--
--
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