Clojure functions that are moot in ClojureScript

Having just come across the await function of clojure.core—which (correct me if I’m wrong) is not useable from ClojureScript—I began to wonder if there is a number of such functions.

My question to y’all is: don’t you think that such functions should be excluded from ClojureScript?

Yes, there are a number of things in clojure.core that aren’t available in cljs.core and thus not usable in CLJS. Most are platform related things that simply aren’t available in JS, or simply not possible (eg. no blocking IO, no await).

They already are? what do you mean?

Well I found out about clojure.core/await because I was creating a macro of the same name, and there was a build warning to the effect that I am redefining something in clojure.core. So await is “available” in CLJS… pardon me if I’m not making sense; I’ve had a few beers.

1 Like

You can :refer-clojure :exclude (await) in the macro ns form, to get rid of the warning.

1 Like