Re: Extend ns macro?

2015-12-02 Thread Nicola Mometto
def interns the var at compile time, binding is a runtime operation > On 2 Dec 2015, at 16:56, Gregg Reynolds wrote: > > > > On Wed, Dec 2, 2015 at 8:11 AM, gianluca torta wrote: > for some reason, it looks like the implementation of the ns macro

Re: Extend ns macro?

2015-12-02 Thread Gregg Reynolds
On Wed, Dec 2, 2015 at 8:11 AM, gianluca torta wrote: > for some reason, it looks like the implementation of the ns macro assumes > that the macro itself is being defined in namespace clojure.core > > try defining myns in the namespace clojure.core, and it should work >

Re: Extend ns macro?

2015-12-02 Thread gianluca torta
for some reason, it looks like the implementation of the ns macro assumes that the macro itself is being defined in namespace clojure.core try defining myns in the namespace clojure.core, and it should work cheers, Gianluca On Tuesday, December 1, 2015 at 9:49:08 PM UTC+1, Gregg Reynolds

Extend ns macro?

2015-12-01 Thread Gregg Reynolds
I'm trying to extend ns, to add some functionality, but it's not working. Is it even possible? If not, is there a way to implement a custom version? I can defmacro my-ns in namespace foo and then start a file with (foo/my-ns ...), but I can't get it to behave like ns (I copied the ns code from