Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well, (use :as) fixes that one.

Namespaces are a honking great idea, let's have more of those!

Also, I think I just realized an another problem -- if I understood the lib correctly, it scans through the PATH once at require time. This is bad, because Clojure is often deployed in places where processes run for very long times. Even things as immutable as tools in PATH can change when given long enough time.



There's no (use :as), only require. (require [shake.core :as sh])

That's a step in the right direction, but it still triggers tons of warnings replacing vars in clojure.core.


use does accept an :as option:

    => (use '[clojure.set :as set])
    => set/intersection
    #<set$intersection clojure.set$intersection@58ca40be>
Prior to the addition of :refer to require, this was often paired with an :only (...) in order to alias a namespace as well as refer in some limited set of vars if desired, all in one declaration.


Huh, I checked the docs before I commented. It is indistinguishable from require :as, thought, right?


As far as I know. Honestly, by use/require/refer-fu is not very strong, I always just use the ns macro.


Yes, the :as option is the same whether you use it with require or use.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: