It seems to me this problem can could be made more minimal than it is. As
it is, it seems like Google Closure itself might be rewriting the code. I
don't see any other way for a gensym to end up used over "this".
Need more information via a more minimal case.
David
On Sat, Jun 6, 2015 at 5:56 AM
Yeah, given that CLJS has no var interning I suppose this is expected behavior.
A safer approach for the init problem you describe would be
(defonce foo (delay #_your-init-code-here-maybe-returning js/undefined))
@foo
On Saturday, June 6, 2015 at 7:44:45 AM UTC+2, Alice Bellard wrote:
> (defo
Sorry, I thought it was the well known issue. Here is the simplified macro:
(defmacro custom-this []
(list 'js* "this")
)
(defmacro test-comp
[tsym tfields bsym & impls]
`(defn ~tsym [~@tfields]
~@(map (fn[c]
`(this-as this#
(aset this# ~(str c) ~c