4 ms·
Agreed, namespace clashes are an obvious problem. "My program that worked last week now crashes? Oh, it's because I apt-get installed something completely unrel
by jmmcd 14y ago
Agreed, namespace clashes are an obvious problem. "My program that worked last week now crashes? Oh, it's because I apt-get installed something completely unrelated."
- Tuna-Fish 14y agoWell, (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.
- jcromartie 14y agoThere'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.
- cemerick 14y agouse 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.
- jcromartie 14y agoHuh, I checked the docs before I commented. It is indistinguishable from require :as, thought, right?