Fork me on GitHub
#cljs-dev
<
2020-04-27
>
dnolen13:04:50

re: allow requires from the global namespace could work for other useful JS targets too, Rhino/Nashorn/Graal.js https://clojure.atlassian.net/browse/CLJS-3233

dnolen13:04:04

all these environments offer host API access via some global property

dnolen14:04:24

after auditing some React Native stuff, I think one level for property access for namespaces is too restrictive, being able to access NativeModules needs at least two levels, but likely more https://clojure.atlassian.net/projects/CLJS/issues/CLJS-3235

thheller14:04:13

why not a . for the second case? then $ has the clear meaning of separating <source>$<export>.<property> vs having two meanings depending in on the place it it used in?

thheller14:04:37

and $ might actually be used inside variable names too so it removes that clash possibility

dnolen14:04:52

I like it, updated

👍 16
richiardiandrea17:04:52

With CLJS-3235 in place would this also mean that "symbols" within objects now appear in the compiler state? If so it would be huge cause we can finally complete them 😄

dnolen18:04:17

not directly, but the plan is to support externs for the global pattern

👍 4