Herwig Hochleitner
added a comment - 04/Aug/14 12:43 PM As detailed in the ML thread, CLJS-680 introduced :js-globals in an attempt to fix this issue. :js-globals should be removed along with a proper fix.

David Nolen
added a comment - 30/Dec/14 3:10 PM We're not going to do this. If anything we're going to move towards more stable names - it is a requirement if we ever want to achieve CLJS step debugging via remote debugging protocols.

The reason for closing this seems bogus to me: There will always be some amount of lexical name mangling in clojurescript, because otherwise some code will miscompile (see CLJS-401). Therefore any hypothetical step debugger must already have some sort of source mapping information from the compiler. Why should more mangling do any more harm then?

I say: Just gensym each and every single lexical binding and be done with it forever. JS names are not meant to directly correspond to CLJS names.

Herwig Hochleitner
added a comment - 31/Dec/14 4:24 AM The reason for closing this seems bogus to me: There will always be some amount of lexical name mangling in clojurescript, because otherwise some code will miscompile (see CLJS-401). Therefore any hypothetical step debugger must already have some sort of source mapping information from the compiler. Why should more mangling do any more harm then?
I say: Just gensym each and every single lexical binding and be done with it forever. JS names are not meant to directly correspond to CLJS names.

That "there will be some amount of lexical name mangling" is about as problematic as there will be "some inaccuracy to source mapping". Let's wait and see. Until then we prioritize stable names from source produced by the compiler.

One interesting line of thought is to eliminate gensym'ing altogether and instead use a source map like approach for generating stable names where every symbol is instead uniquely identifiable by namespace index N, and line N, column N.

David Nolen
added a comment - 31/Dec/14 10:49 AM That "there will be some amount of lexical name mangling" is about as problematic as there will be "some inaccuracy to source mapping". Let's wait and see. Until then we prioritize stable names from source produced by the compiler.
One interesting line of thought is to eliminate gensym'ing altogether and instead use a source map like approach for generating stable names where every symbol is instead uniquely identifiable by namespace index N, and line N, column N.