This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-27
Channels
- # ai (4)
- # beginners (102)
- # boot (216)
- # cider (20)
- # cljs-dev (9)
- # clojure (130)
- # clojure-russia (4)
- # clojure-spec (9)
- # clojure-uk (11)
- # clojurescript (59)
- # core-async (2)
- # cursive (10)
- # datomic (51)
- # figwheel (1)
- # flambo (3)
- # hoplon (2)
- # luminus (1)
- # om (17)
- # om-next (4)
- # onyx (2)
- # perun (2)
- # re-frame (79)
- # ring (5)
- # ring-swagger (9)
- # rum (3)
- # schema (3)
- # specter (9)
- # untangled (3)
- # vim (1)
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 (https://gist.github.com/swannodette/4fc9ccc13f62c66456daf19c47692799)
Pretty cool 👍
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.