Macros shadowing defn in clojurescript, akin to definiline

2012-09-13 Thread Herwig Hochleitner
Hello, right now, this works in clojurescript: ;; in a file lib/fancy.cljs (ns lib.fancy) (defn fun [x] [:runtime :fun x]) ;; in a file lib/fancy.clj (ns lib.fancy) (defmacro fun [x] [:precompiled :fun x]) ;; in a file app/core.clj (ns app.core (:require [lib.fancy :as fancy])

Re: Macros shadowing defn in clojurescript, akin to definiline

2012-09-13 Thread Herwig Hochleitner
*typo correction*: the third block should be in a file app/core.*cljs* * * thanks -- 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

Re: Macros shadowing defn in clojurescript, akin to definiline

2012-09-13 Thread David Nolen
On Thu, Sep 13, 2012 at 8:30 AM, Herwig Hochleitner hhochleit...@gmail.com wrote: Hello, right now, this works in clojurescript: ;; in a file lib/fancy.cljs (ns lib.fancy) (defn fun [x] [:runtime :fun x]) ;; in a file lib/fancy.clj (ns lib.fancy) (defmacro fun [x] [:precompiled

Re: Macros shadowing defn in clojurescript, akin to definiline

2012-09-13 Thread Herwig Hochleitner
2012/9/13 David Nolen dnolen.li...@gmail.com That's how compiler macros are intended to work. Great! So am I right with the notion, that clojure's defmacros are not compiler macros and one would use the :inline meta key in clojure to achieve the same effect? Supposing that I am, that means

Re: Macros shadowing defn in clojurescript, akin to definiline

2012-09-13 Thread David Nolen
On Thu, Sep 13, 2012 at 9:17 AM, Herwig Hochleitner hhochleit...@gmail.com wrote: 2012/9/13 David Nolen dnolen.li...@gmail.com That's how compiler macros are intended to work. Great! So am I right with the notion, that clojure's defmacros are not compiler macros and one would use the

Re: Macros shadowing defn in clojurescript, akin to definiline

2012-09-13 Thread Herwig Hochleitner
Thanks for your clarification! A few further thoughts: ClojureScript may one day be self-hosting but it's not a near term goal given the desire to target the kinds of clients that run JavaScript. Considering that the path to a self hosting clojure would probably start at clojurescript and