This page is not created by, affiliated with, or supported by Slack Technologies, Inc.


I have kind of a random question. Does anybody know for sure why clojure.browser.repl goes through goog.require while node, nashorn, and rhino repls all simply overwrite it? I'm assuming it's because goog.require provides dependency ordering, but that's irrelevant in synchronous loading environments.


@potetm: I think it's not about dep ordering, but rather about dependency loading


Took me a while but I gave the latest extern inference stuff a spin (


Pretty cool :+1:


I'm a bit confused about where supplying a type hint is possible though. Is it only for argvecs or could I also do something like this somehow:

(def ^js/React react js/React)
and by using react in all further calls get extern inference for free?


Ah, cool. Seems the case of (js/Whatever.create ...) is also covered by inference


Ok so as far as I can see this (similar to the question above) works as well:

(def ^js/Whatever we js/Whatever)


@anmonteiro Yeah. The interesting thing there is that browser.repl does overwrite how script tags are written. So even the loading is handled by cljs. So it seems to me that we could have just skipped the built-in goog.require and proxied to our own tag writer.


However, goog.require does ensure that dependencies are ordered prior to the required script.